extracted method

This commit is contained in:
Hauke Klement
2015-02-09 16:24:33 +01:00
parent 342c3a153c
commit 232c6b398f
5 changed files with 14 additions and 10 deletions

View File

@ -29,7 +29,7 @@ describe ErrorsController do
expect(response.body).to eq({hint: hint}.to_json)
end
expect_content_type('application/json')
expect_json
expect_status(200)
end
@ -46,7 +46,7 @@ describe ErrorsController do
expect { request.call }.to change(Error, :count).by(1)
end
expect_content_type('application/json')
expect_json
expect_status(201)
end
end
@ -55,7 +55,7 @@ describe ErrorsController do
before(:each) { post :create, execution_environment_id: FactoryGirl.build(:error).execution_environment.id, error: {}, format: :json }
expect_assigns(error: Error)
expect_content_type('application/json')
expect_json
expect_status(422)
end
end