mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 15:28:30 +08:00
BUGFIX: blank name causes SSO to explode
This commit is contained in:
@ -34,6 +34,18 @@ describe DiscourseSingleSignOn do
|
||||
parsed.custom_fields["b.b"].should == "B.b"
|
||||
end
|
||||
|
||||
it "can lookup or create user when name is blank" do
|
||||
# so we can create system messages
|
||||
Fabricate(:admin)
|
||||
sso = DiscourseSingleSignOn.new
|
||||
sso.username = "test"
|
||||
sso.name = ""
|
||||
sso.email = "test@test.com"
|
||||
sso.external_id = "A"
|
||||
user = sso.lookup_or_create_user
|
||||
user.should_not == nil
|
||||
end
|
||||
|
||||
it "can fill in data on way back" do
|
||||
sso = make_sso
|
||||
|
||||
|
Reference in New Issue
Block a user