Skip to content

Commit 274fa38

Browse files
committed
Have test pass for the right reason
1 parent 7ac31a1 commit 274fa38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/requests/user_pages_spec.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@
201201
{ user: { admin: true, password: user.password,
202202
password_confirmation: user.password } }
203203
end
204-
before { patch user_path(user), params }
204+
before do
205+
sign_in user, no_capybara: true
206+
patch user_path(user), params
207+
end
205208
specify { expect(user.reload).not_to be_admin }
206209
end
207210
end

0 commit comments

Comments
 (0)