test/ruby-saml_test.rb in ruby-saml-0.2.2 vs test/ruby-saml_test.rb in ruby-saml-0.2.3
- old
+ new
@@ -75,8 +75,18 @@
settings.idp_sso_target_url = "http://stuff.com"
auth_url = Onelogin::Saml::Authrequest.new.create(settings)
assert auth_url =~ /^http:\/\/stuff\.com\?SAMLRequest=/
payload = CGI.unescape(auth_url.split("=").last)
end
- end
+ should "accept extra parameters" do
+ settings = Onelogin::Saml::Settings.new
+ settings.idp_sso_target_url = "http://stuff.com"
+
+ auth_url = Onelogin::Saml::Authrequest.new.create(settings, { :hello => "there" })
+ assert auth_url =~ /&hello=there$/
+
+ auth_url = Onelogin::Saml::Authrequest.new.create(settings, { :hello => nil })
+ assert auth_url =~ /&hello=$/
+ end
+ end
end