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 100100 expect ( Kernel ) . not_to have_received ( :sleep )
101101 end
102102
103- it 'should return invalid json' do
103+ it 'should raise error on invalid json response ' do
104104 WebMock . stub_request ( :post , expected_url )
105105 . with ( body : expected_body_for_webmock , headers : expected_headers )
106106 . to_return ( status : 200 , body : 'this is not json' , headers : { 'Content-Type' => 'text/plain' } )
115115 expect ( Kernel ) . not_to have_received ( :sleep )
116116 end
117117
118- it 'should raise error on invalid structure' do
118+ it 'should raise error on invalid response structure' do
119119 WebMock . stub_request ( :post , expected_url )
120120 . with ( body : expected_body_for_webmock , headers : expected_headers )
121121 . 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