diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-10 21:40:37 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-10 21:40:37 -0600 |
commit | b174a733a5ba58f1d9802feaa4793b4a6c2df523 (patch) | |
tree | 71e1022301b0e860b1d65a85f493ea7fd2711200 /spec/support | |
parent | 5faf9807968ce9f7f548474afdc31029e57103dc (diff) |
Añade specs del controlador de companies
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/requests/post_request.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/requests/post_request.rb b/spec/support/shared_examples/requests/post_request.rb index b7226d0..c7b8d77 100644 --- a/spec/support/shared_examples/requests/post_request.rb +++ b/spec/support/shared_examples/requests/post_request.rb @@ -4,8 +4,8 @@ RSpec.shared_examples 'a POST request' do let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } context 'with correct parameters' do - it 'returns a successful http status and a response to the posted data' do - post(route, params: params.to_json, headers:) + it 'returns a successful http status and a response with the posted data' do + post(route, params: params, headers:) expect(response).to have_http_status(200) expect(response.body).to include_strings(expected_text) end @@ -13,7 +13,7 @@ RSpec.shared_examples 'a POST request' do context 'with incorrect parameters' do it 'returns a client side error http status and a error message' do - post(route, params: wrong_params.to_json, headers:) + post(route, params: wrong_params, headers:) expect(response).to have_http_status(desired_error_status) expect(response.body).to include_strings(expected_error_messages) end |