Use a css regex matcher to find campaign entries

This commit is contained in:
Hernan Schmidt 2016-08-22 11:23:18 +02:00
parent 4d6868d9bb
commit 393deefcf9
2 changed files with 8 additions and 8 deletions

View file

@ -31,10 +31,10 @@ feature Campaign do
# Validations
expect(flash).to eq('Campaign successfully created.')
expect(page).to have_selector('.campaign-name', text: 'Test Campaign')
expect(page).to have_selector('.campaign-visits', text: '0')
expect(page).to have_selector('.campaign-registrations', text: '0')
expect(page).to have_selector('.campaign-submissions', text: '0')
expect(page).to have_selector('[id^="name_"]', text: 'Test Campaign')
expect(page).to have_selector('[id^="visits_"]', text: '0')
expect(page).to have_selector('[id^="registrations_"]', text: '0')
expect(page).to have_selector('[id^="submissions_"]', text: '0')
expect(Campaign.count).to eq(expected_count)