Ruby 2.2 fixes

This commit is contained in:
Sam
2014-12-29 13:30:54 +11:00
parent 8d03ff6f82
commit ef62933034
5 changed files with 34 additions and 11 deletions

View File

@ -34,6 +34,20 @@ describe DiscourseSingleSignOn do
parsed.custom_fields["b.b"].should == "B.b"
end
it "can do round trip parsing correctly" do
sso = SingleSignOn.new
sso.sso_secret = "test"
sso.name = "sam saffron"
sso.username = "sam"
sso.email = "sam@sam.com"
sso = SingleSignOn.parse(sso.payload, "test")
sso.name.should == "sam saffron"
sso.username.should == "sam"
sso.email.should == "sam@sam.com"
end
it "can lookup or create user when name is blank" do
# so we can create system messages
Fabricate(:admin)