Skip to content

Commit

Permalink
Add spec for reason phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanis committed Apr 17, 2023
1 parent 337382f commit 53712f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/response_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
end

describe 'response unboxing' do
subject { described_class.new(status: 200, response_headers: {}, body: 'Hi!') }
subject { described_class.new(status: 200, response_headers: {}, body: 'Hi!', reason_phrase: 'Success') }

let(:env) { { method: :get } }
let(:response) { subject.to_response(env) }
Expand All @@ -224,6 +224,10 @@
it 'merges the body' do
expect(response.body).to eq('Hi!')
end

it 'merges the reason phrase' do
expect(response.reason_phrase).to eq('Success')
end
end

describe 'remove age before caching and normalize max-age if non-zero age present' do
Expand Down

0 comments on commit 53712f1

Please sign in to comment.