Commit ec6f782

mo <mo@mokhan.ca>
2019-04-30 20:49:29
fix linter errors
1 parent 42bab38
Changed files (2)
lib
saml
spec
lib/saml/kit/builders/authentication_request.rb
@@ -37,11 +37,8 @@ module Saml
             IssueInstant: now.utc.iso8601,
             Destination: destination,
           }
-          options[:ForceAuthn] = force_authn if !force_authn.nil?
-          if assertion_consumer_service_url.present?
-            options[:AssertionConsumerServiceURL] =
-              assertion_consumer_service_url
-          end
+          options[:ForceAuthn] = force_authn unless force_authn.nil?
+          options[:AssertionConsumerServiceURL] = assertion_consumer_service_url if assertion_consumer_service_url.present?
           options
         end
       end
spec/saml/kit/builders/authentication_request_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Saml::Kit::Builders::AuthenticationRequest do
       expect(result['AuthnRequest']['NameIDPolicy']['Format']).to eql(Saml::Kit::Namespaces::PERSISTENT)
     end
 
-    context "when force authn is enabled" do
+    context 'when force authn is enabled' do
       before { subject.force_authn = true }
 
       let(:result) { Hash.from_xml(subject.to_xml) }