lib/generators/graphiti/templates/destroy_request_spec.rb.erb in graphiti-1.0.rc.4 vs lib/generators/graphiti/templates/destroy_request_spec.rb.erb in graphiti-1.0.rc.5

- old
+ new

@@ -8,13 +8,15 @@ describe 'basic destroy' do let!(:<%= var %>) { create(:<%= var %>) } it 'updates the resource' do expect(<%= resource_class %>).to receive(:find).and_call_original - expect { make_request }.to change { <%= model_class %>.count }.by(-1) + expect { + make_request + expect(response.status).to eq(200), response.body + }.to change { <%= model_class %>.count }.by(-1) expect { <%= var %>.reload } .to raise_error(ActiveRecord::RecordNotFound) - expect(response.status).to eq(200) expect(json).to eq('meta' => {}) end end end