aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
authorAlban Peignier2018-05-10 20:54:52 +0200
committerAlban Peignier2018-05-10 20:54:52 +0200
commit6f624a7ca68600e93aae71f98182dfeb8c082674 (patch)
tree769a07779cb6f58727c2fb8ac7497ce11042a7fe /spec/controllers
parent65afd2cfe722e57241d27cf8a1069ca67aafc3e0 (diff)
downloadchouette-core-6f624a7ca68600e93aae71f98182dfeb8c082674.tar.bz2
Test WorkbenchesController without workbenches.update permission. Refs #69606960-workgroup-edition
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/workbenches_controller_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/controllers/workbenches_controller_spec.rb b/spec/controllers/workbenches_controller_spec.rb
index d9403d7b0..8478b0a7b 100644
--- a/spec/controllers/workbenches_controller_spec.rb
+++ b/spec/controllers/workbenches_controller_spec.rb
@@ -25,8 +25,10 @@ RSpec.describe WorkbenchesController, :type => :controller do
}
let(:request){ patch :update, id: workbench.id, workbench: workbench_params }
- it 'should respond with 403' do
- expect(request).to have_http_status 403
+ without_permission "workbenches.update" do
+ it 'should respond with 403' do
+ expect(request).to have_http_status 403
+ end
end
with_permission "workbenches.update" do