Skip to content

Commit c29c1f8

Browse files
authored
Merge pull request #6 from taketo1113/fix-rack-test-header
CI: fix to check response header of content-length for rack v3.1.x
2 parents eeccf54 + b3823d5 commit c29c1f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/rack-change-password-url/middleware_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@
5050
get @path
5151

5252
expect(last_response.status).to eq 200
53-
expect(last_response.headers).to eq({})
53+
if Gem::Version.new(Rack.release) >= Gem::Version.new("3.1.0")
54+
expect(last_response.headers).to eq({ "content-length" => "16" })
55+
else
56+
expect(last_response.headers).to eq({})
57+
end
5458
expect(last_response.body).to eq 'Example App Body'
5559
end
5660
end

0 commit comments

Comments
 (0)