File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 100
100
expect ( Kernel ) . not_to have_received ( :sleep )
101
101
end
102
102
103
- it 'should return invalid json' do
103
+ it 'should raise error on invalid json response ' do
104
104
WebMock . stub_request ( :post , expected_url )
105
105
. with ( body : expected_body_for_webmock , headers : expected_headers )
106
106
. to_return ( status : 200 , body : 'this is not json' , headers : { 'Content-Type' => 'text/plain' } )
115
115
expect ( Kernel ) . not_to have_received ( :sleep )
116
116
end
117
117
118
- it 'should raise error on invalid structure' do
118
+ it 'should raise error on invalid response structure' do
119
119
WebMock . stub_request ( :post , expected_url )
120
120
. with ( body : expected_body_for_webmock , headers : expected_headers )
121
121
. to_return ( status : 200 , body : { 'no_predictions' => [ ] } . to_json , headers : { 'Content-Type' => 'application/json' } )
You can’t perform that action at this time.
0 commit comments