Test slugs from the user's point of view
System tests are about user experience, so instead of checking the slug has been updated in the database, we check whether the page can be accessed using the slug. Note the budget group test is a bit different because the name of the group isn't present in the budget group page.
This commit is contained in:
@@ -75,7 +75,10 @@ describe "Admin polls", :admin do
|
||||
expect(page).to have_content "Upcoming poll"
|
||||
expect(page).to have_content I18n.l(start_date)
|
||||
expect(page).to have_content I18n.l(end_date)
|
||||
expect(Poll.last.slug).to eq "#{Poll.last.name.to_s.parameterize}"
|
||||
|
||||
visit poll_path(id: "upcoming-poll")
|
||||
|
||||
expect(page).to have_content "Upcoming poll"
|
||||
end
|
||||
|
||||
scenario "Edit" do
|
||||
|
||||
Reference in New Issue
Block a user