Skip to content

Commit 7c525e4

Browse files
committed
Update Expect-CT to use separator in spec
1 parent cc3d97b commit 7c525e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/secure_headers/headers/expect_certificate_transparency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def value
4949
enforced_directive,
5050
max_age_directive,
5151
report_uri_directive
52-
].compact.join("; ").strip
52+
].compact.join(", ").strip
5353
end
5454

5555
def enforced_directive

spec/lib/secure_headers/headers/expect_certificate_spec.rb renamed to spec/lib/secure_headers/headers/expect_certificate_transparency_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
module SecureHeaders
55
describe ExpectCertificateTransparency do
6-
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, enforce: true).value).to eq("enforce; max-age=1234") }
6+
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, enforce: true).value).to eq("enforce, max-age=1234") }
77
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, enforce: false).value).to eq("max-age=1234") }
88
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, enforce: "yolocopter").value).to eq("max-age=1234") }
9-
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, report_uri: "https://report-uri.io/expect-ct").value).to eq("max-age=1234; report-uri=\"https://report-uri.io/expect-ct\"") }
9+
specify { expect(ExpectCertificateTransparency.new(max_age: 1234, report_uri: "https://report-uri.io/expect-ct").value).to eq("max-age=1234, report-uri=\"https://report-uri.io/expect-ct\"") }
1010
specify do
1111
config = { enforce: true, max_age: 1234, report_uri: "https://report-uri.io/expect-ct" }
12-
header_value = "enforce; max-age=1234; report-uri=\"https://report-uri.io/expect-ct\""
12+
header_value = "enforce, max-age=1234, report-uri=\"https://report-uri.io/expect-ct\""
1313
expect(ExpectCertificateTransparency.new(config).value).to eq(header_value)
1414
end
1515

0 commit comments

Comments
 (0)