diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-11 12:10:57 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-11 12:10:57 -0600 |
commit | 3dae1ce143d006cc75940b746a8eb74982e6e861 (patch) | |
tree | 5bfa59dfd11bbfc9b8ef2a38da067e0c2ca0da42 /spec/support | |
parent | 6b3cc5c3a33643c0e42396142a2d3204ada2bb82 (diff) |
Añade test de scoping
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/master_role_required_requests/post_request.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/shared_examples/master_role_required_requests/post_request.rb b/spec/support/shared_examples/master_role_required_requests/post_request.rb new file mode 100644 index 0000000..9df49b1 --- /dev/null +++ b/spec/support/shared_examples/master_role_required_requests/post_request.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +RSpec.shared_examples 'a POST request that requires a master user' do + context 'with a regular user' do + it 'returns 403 http status' do + post(route, params:, headers:) + expect(response).to have_http_status(403) + end + end +end
\ No newline at end of file |