@@ -120,7 +120,7 @@ def set_security_headers(subject)
120120 it "does not set the HPKP header if request is over HTTP" do
121121 allow ( subject ) . to receive_message_chain ( :request , :ssl? ) . and_return ( false )
122122 should_not_assign_header ( HPKP_HEADER_NAME )
123- subject . set_hpkp_header ( max_age : 1234 )
123+ subject . set_hpkp_header ( :max_age => 1234 )
124124 end
125125
126126 it "does not set the CSP header if disabled" do
@@ -208,32 +208,32 @@ def set_security_headers(subject)
208208 describe "#set_public_key_pins" do
209209 it "sets the Public-Key-Pins header" do
210210 should_assign_header ( HPKP_HEADER_NAME + "-Report-Only" , "max-age=1234" )
211- subject . set_hpkp_header ( max_age : 1234 )
211+ subject . set_hpkp_header ( :max_age => 1234 )
212212 end
213213
214214 it "allows you to enforce public key pinning" do
215215 should_assign_header ( HPKP_HEADER_NAME , "max-age=1234" )
216- subject . set_hpkp_header ( max_age : 1234 , enforce : true )
216+ subject . set_hpkp_header ( :max_age => 1234 , :enforce => true )
217217 end
218218
219219 it "allows you to specific a custom max-age value" do
220220 should_assign_header ( HPKP_HEADER_NAME + "-Report-Only" , 'max-age=1234' )
221- subject . set_hpkp_header ( max_age : 1234 )
221+ subject . set_hpkp_header ( :max_age => 1234 )
222222 end
223223
224224 it "allows you to specify includeSubdomains" do
225225 should_assign_header ( HPKP_HEADER_NAME , "max-age=1234; includeSubDomains" )
226- subject . set_hpkp_header ( max_age : 1234 , include_subdomains : true , enforce : true )
226+ subject . set_hpkp_header ( :max_age => 1234 , :include_subdomains => true , :enforce => true )
227227 end
228228
229229 it "allows you to specify a report-uri" do
230230 should_assign_header ( HPKP_HEADER_NAME , "max-age=1234; report-uri=\" https://foobar.com\" " )
231- subject . set_hpkp_header ( max_age : 1234 , report_uri : "https://foobar.com" , enforce : true )
231+ subject . set_hpkp_header ( :max_age => 1234 , :report_uri => "https://foobar.com" , :enforce => true )
232232 end
233233
234234 it "allows you to specify a report-uri with app_name" do
235235 should_assign_header ( HPKP_HEADER_NAME , "max-age=1234; report-uri=\" https://foobar.com?enforce=true&app_name=my_app\" " )
236- subject . set_hpkp_header ( max_age : 1234 , report_uri : "https://foobar.com" , app_name : "my_app" , tag_report_uri : true , enforce : true )
236+ subject . set_hpkp_header ( :max_age => 1234 , :report_uri => "https://foobar.com" , :app_name => "my_app" , :tag_report_uri => true , :enforce => true )
237237 end
238238 end
239239
0 commit comments