You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and run the tests (after running bundle), I get the following test failures:
Failures:
1) Grape::Endpoint#headers includes request headers
Failure/Error:
expect(JSON.parse(last_response.body)).to eq(
'Host' => 'example.org',
'Cookie' => ''
)
expected: {"Cookie"=>"", "Host"=>"example.org"}
got: {"Cookie"=>"", "Host"=>"example.org", "Version"=>"HTTP/1.0"}
(compared using ==)
Diff:
@@ -1,3 +1,4 @@
"Cookie" => "",
"Host" => "example.org",
+"Version" => "HTTP/1.0",
# ./spec/grape/endpoint_spec.rb:141:in `block (3 levels) in <top (required)>'
2) Grape::Endpoint#params from body parameters returns a 400 if given an invalid multipart body
Failure/Error: expect(last_response.body).to eq('empty message body supplied with multipart/form-data; boundary=foobar content-type')
expected: "empty message body supplied with multipart/form-data; boundary=foobar content-type"
got: "file is invalid"
(compared using ==)
# ./spec/grape/endpoint_spec.rb:435:in `block (4 levels) in <top (required)>'
Finished in 4.61 seconds (files took 1.81 seconds to load)
2152 examples, 2 failures
Failed examples:
rspec ./spec/grape/endpoint_spec.rb:139 # Grape::Endpoint#headers includes request headers
rspec ./spec/grape/endpoint_spec.rb:426 # Grape::Endpoint#params from body parameters returns a 400 if given an invalid multipart body
It would be nice if these tests could be made to work with rack-test 2.0.
The text was updated successfully, but these errors were encountered:
terceiro
added a commit
to terceiro/grape
that referenced
this issue
Aug 22, 2022
Those two tests endpoint_spec are in the end testing internal details of
rack-test. Change them so that they still test what was intended, but in
a more robust way that does not break on changes on the implementation
details of rack-test.
Fixes: ruby-grape#2278
Those two tests endpoint_spec are in the end testing internal details of
rack-test. Change them so that they still test what was intended, but in
a more robust way that does not break on changes on the implementation
details of rack-test.
Fixes: ruby-grape#2278
If I make this change to
Gemfile
and run the tests (after running
bundle
), I get the following test failures:It would be nice if these tests could be made to work with rack-test 2.0.
The text was updated successfully, but these errors were encountered: