gds-sso 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/gds-sso/version.rb
CHANGED
@@ -69,6 +69,17 @@ describe Api::UserController, type: :controller do
|
|
69
69
|
assert_equal 403, response.status
|
70
70
|
end
|
71
71
|
|
72
|
+
it "should return success if user record doesn't exist" do
|
73
|
+
request.env['warden'] = mock("mock warden")
|
74
|
+
request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
|
75
|
+
request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
|
76
|
+
request.env['warden'].expects(:user).at_least_once.returns(GDS::SSO::ApiUser.new)
|
77
|
+
|
78
|
+
post :reauth, uid: "nonexistent-user"
|
79
|
+
|
80
|
+
assert_equal 200, response.status
|
81
|
+
end
|
82
|
+
|
72
83
|
it "should set remotely_signed_out to true on the user" do
|
73
84
|
# Test that it authenticates
|
74
85
|
request.env['warden'] = mock("mock warden")
|
Binary file
|