Skip to content

Change find available hours method#2

Open
wazzuper wants to merge 5 commits intochange-three-best-doctors-requestfrom
change-find-available-hours-method
Open

Change find available hours method#2
wazzuper wants to merge 5 commits intochange-three-best-doctors-requestfrom
change-find-available-hours-method

Conversation

@wazzuper
Copy link
Owner

  • Added available hours scope
  • Deleted old class methods
  • Added tests

before { create_list(:visiting_hour, 5, visiting_day_id: visiting_day_first.id) }
before { create_list(:appointment, 3, visiting_day_id: visiting_day_second.id) }

it 'returns available hours for booking' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно использовать контексты http://www.betterspecs.org/#short

Так же не понятно зачем создавать visiting_day если тут тестируется метод класса visiting_hour. Достаточно просто создать visiting_hour с нужными appointments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants