Merge branch 'master' of https://github.com/discourse/discourse
This commit is contained in:
commit
dc4907a65c
|
@ -2,7 +2,7 @@ class SingleSignOn
|
||||||
ACCESSORS = [:nonce, :name, :username, :email, :avatar_url, :avatar_force_update, :require_activation,
|
ACCESSORS = [:nonce, :name, :username, :email, :avatar_url, :avatar_force_update, :require_activation,
|
||||||
:about_me, :external_id, :return_sso_url, :admin, :moderator, :suppress_welcome_message]
|
:about_me, :external_id, :return_sso_url, :admin, :moderator, :suppress_welcome_message]
|
||||||
FIXNUMS = []
|
FIXNUMS = []
|
||||||
BOOLS = [:avatar_force_update, :admin, :moderator, :suppress_welcome_message]
|
BOOLS = [:avatar_force_update, :admin, :moderator, :require_activation, :suppress_welcome_message]
|
||||||
NONCE_EXPIRY_TIME = 10.minutes
|
NONCE_EXPIRY_TIME = 10.minutes
|
||||||
|
|
||||||
attr_accessor(*ACCESSORS)
|
attr_accessor(*ACCESSORS)
|
||||||
|
|
|
@ -19,6 +19,7 @@ describe DiscourseSingleSignOn do
|
||||||
sso.username = "sam"
|
sso.username = "sam"
|
||||||
sso.name = "sam saffron"
|
sso.name = "sam saffron"
|
||||||
sso.external_id = "100"
|
sso.external_id = "100"
|
||||||
|
sso.require_activation = false
|
||||||
sso.custom_fields["a"] = "Aa"
|
sso.custom_fields["a"] = "Aa"
|
||||||
sso.custom_fields["b.b"] = "B.b"
|
sso.custom_fields["b.b"] = "B.b"
|
||||||
sso
|
sso
|
||||||
|
@ -30,6 +31,7 @@ describe DiscourseSingleSignOn do
|
||||||
expect(parsed.username).to eq sso.username
|
expect(parsed.username).to eq sso.username
|
||||||
expect(parsed.name).to eq sso.name
|
expect(parsed.name).to eq sso.name
|
||||||
expect(parsed.external_id).to eq sso.external_id
|
expect(parsed.external_id).to eq sso.external_id
|
||||||
|
expect(parsed.require_activation).to eq false
|
||||||
expect(parsed.custom_fields["a"]).to eq "Aa"
|
expect(parsed.custom_fields["a"]).to eq "Aa"
|
||||||
expect(parsed.custom_fields["b.b"]).to eq "B.b"
|
expect(parsed.custom_fields["b.b"]).to eq "B.b"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue