Skip to content

Commit

Permalink
spec: Fix a path construction, test passes now
Browse files Browse the repository at this point in the history
Explicitly pass :id, and only :id, to the route helper
for this test.

We only need the :id from the newly-constructed test restroom
in order to visit the correct path. Don't pass anything else
to the `restroom_path` route helper.

(Passing the whole array of restroom data was causing the whole
array to be erroneously interpreted as if it was the :locale
prefix in the path. Pass only the :id instead.)
  • Loading branch information
DeeDeeG committed Apr 14, 2020
1 parent 47ceee0 commit 4c40d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/features/contacts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
it 'should show a generic contact when contact is not from restroom form' do
restroom = create(:restroom, name: "Mission Creek Cafe")

visit restroom_path restroom
visit restroom_path(:id => restroom.id)
click_link 'Contact'

expect(page).to_not have_content('Mission Creek Cafe')
Expand Down

0 comments on commit 4c40d19

Please sign in to comment.