Skip to content

Commit d1c9266

Browse files
committed
test setting dietary restrictions during signup
update spec to check that dietary restrictions can be provided when filling in member details during signup.
1 parent 3bbffda commit d1c9266

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/features/member_joining_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
fill_in 'member_surname', with: 'Doe'
4141
fill_in 'member_email', with: '[email protected]'
4242
fill_in 'member_about_you', with: Faker::Lorem.paragraph
43+
check 'Vegan'
44+
check 'Other'
45+
fill_in 'Other dietary restrictions', with: 'peanut allergy'
4346
click_on 'Next'
4447

4548
expect(page).to have_current_path(step2_member_path)
@@ -50,6 +53,8 @@
5053
expect(page).to have_content('she')
5154
expect(page).to have_content('Jane Doe')
5255
expect(page).to have_link('[email protected]')
56+
expect(page).to have_selector('.badge', text: 'Vegan')
57+
expect(page).to have_selector('.badge', text: 'Peanut allergy')
5358
end
5459

5560
scenario 'Picking a mailing list on step 2 subscribes you to that list' do

0 commit comments

Comments
 (0)