Skip to content

Commit 7ac31a1

Browse files
committed
Switch to a direct 'get' request
1 parent 1180163 commit 7ac31a1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/requests/authentication_pages_spec.rb

+4-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@
128128
let(:wrong_user) { FactoryGirl.create(:user, email: "[email protected]") }
129129
before { sign_in user, no_capybara: true }
130130

131-
describe "visiting Users#edit page" do
132-
before { visit edit_user_path(wrong_user) }
133-
it { should_not have_title(full_title('Edit user')) }
131+
describe "submitting a GET request to the Users#edit action" do
132+
before { get edit_user_path(wrong_user) }
133+
specify { expect(response.body).not_to match(full_title('Edit user')) }
134+
specify { expect(response).to redirect_to(root_url) }
134135
end
135136

136137
describe "submitting a PATCH request to the Users#update action" do

0 commit comments

Comments
 (0)