spec/unit/user_spec.rb in gds-sso-9.4.0 vs spec/unit/user_spec.rb in gds-sso-10.0.0
- old
+ new
@@ -9,15 +9,21 @@
@auth_hash = {
'provider' => 'gds',
'uid' => 'abcde',
'credentials' => {'token' => 'abcdefg', 'secret' => 'abcdefg'},
'info' => {'name' => 'Matt Patterson', 'email' => 'matt@alphagov.co.uk'},
- 'extra' => {'user' => {'permissions' => [], 'organisation_slug' => nil}}
+ 'extra' => {'user' => {'permissions' => [], 'organisation_slug' => nil, 'disabled' => false}}
}
end
it "should extract the user params from the oauth hash" do
- expected = {'uid' => 'abcde', 'name' => 'Matt Patterson', 'email' => 'matt@alphagov.co.uk', "permissions" => [], "organisation_slug" => nil}
+ expected = {'uid' => 'abcde',
+ 'name' => 'Matt Patterson',
+ 'email' => 'matt@alphagov.co.uk',
+ "permissions" => [],
+ "organisation_slug" => nil,
+ 'disabled' => false,
+ }
expect(GDS::SSO::User.user_params_from_auth_hash(@auth_hash)).to eq(expected)
end
context "making sure that the lint spec is valid" do
class TestUser < OpenStruct