diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-13 19:48:40 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-13 19:48:40 -0600 |
commit | 5c899df07753a31543f8dad725a26ccddc44dfe2 (patch) | |
tree | cc13040e9f859688ec2ec454486528394bbc1cde /spec/support/shared_examples | |
parent | 3dae1ce143d006cc75940b746a8eb74982e6e861 (diff) |
Añade método update a UserAccountsController
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r-- | spec/support/shared_examples/requests/put_request.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/support/shared_examples/requests/put_request.rb b/spec/support/shared_examples/requests/put_request.rb index 9e46235..d329b78 100644 --- a/spec/support/shared_examples/requests/put_request.rb +++ b/spec/support/shared_examples/requests/put_request.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.shared_examples 'a PUT request' do +RSpec.shared_examples 'a PUT request' do |account: false| context 'with correct parameters' do it 'returns a successful http status and a response with the putted data' do put(route, params:, headers:) @@ -17,10 +17,12 @@ RSpec.shared_examples 'a PUT request' do end end - context 'to an nonexistent resource' do - it 'returns a 404 status' do - put(wrong_route, params:, headers:) - expect(response).to have_http_status(404) + if account + context 'to an nonexistent resource' do + it 'returns a 404 status' do + put(wrong_route, params:, headers:) + expect(response).to have_http_status(404) + end end end end |