Use check and uncheck methods from Capybara DSL

in user_changes_notified_of_own_activity_spec
This commit is contained in:
Richard Macklin 2017-01-31 18:27:14 -08:00
parent 946efd9fa6
commit 4647d13893
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ feature 'Profile > Notifications > User changes notified_of_own_activity setting
expect(page).not_to have_checked_field('user[notified_of_own_activity]')
page.find('#user_notified_of_own_activity').set(true)
check 'user[notified_of_own_activity]'
expect(page).to have_content('Notification settings saved')
expect(page).to have_checked_field('user[notified_of_own_activity]')
@ -24,7 +24,7 @@ feature 'Profile > Notifications > User changes notified_of_own_activity setting
expect(page).to have_checked_field('user[notified_of_own_activity]')
page.find('#user_notified_of_own_activity').set(false)
uncheck 'user[notified_of_own_activity]'
expect(page).to have_content('Notification settings saved')
expect(page).not_to have_checked_field('user[notified_of_own_activity]')