Skip to content

Commit 882c077

Browse files
committed
test to display of attendee dietary restrictions
add test to cover display of attendees' dietary restrictions on the workshop admin page.
1 parent 1acabf6 commit 882c077

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/features/admin/workshops_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,21 @@
164164
end
165165
end
166166

167+
context 'dietary restrictions' do
168+
scenario 'displays dietary restriction badges for attendees' do
169+
workshop = Fabricate(:workshop)
170+
attendee = Fabricate(:attending_workshop_invitation, workshop: workshop)
171+
attendee.member.update(dietary_restrictions: %w[vegan gluten_free])
172+
173+
visit admin_workshop_path(workshop)
174+
175+
member_link = find('a', exact_text: attendee.member.full_name)
176+
sibling = member_link.find(:xpath, 'following-sibling::p')
177+
expect(sibling).to have_text('Vegan')
178+
expect(sibling).to have_text('Gluten free')
179+
end
180+
end
181+
167182
context '#actions' do
168183
context 'sending invitations to attendees' do
169184
scenario 'for a workshop' do

0 commit comments

Comments
 (0)