aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/lines_controller_spec.rb
diff options
context:
space:
mode:
authorLuc Donnet2018-03-02 11:15:23 +0100
committerGitHub2018-03-02 11:15:23 +0100
commita6de378529be7ca51ba2d1d7a8f03df263f3d2a8 (patch)
tree2be36e14e00afed1d934de285f7c0e412fb6b78a /spec/controllers/lines_controller_spec.rb
parentf6f29efdac828a8d44130868215307daa1ab07c3 (diff)
parent63ab2c81b292fe18c28f9f22232ad3cb712a9717 (diff)
downloadchouette-core-a6de378529be7ca51ba2d1d7a8f03df263f3d2a8.tar.bz2
Merge pull request #295 from af83/5865-validate-referential-cloning
5865 Ensure user is allowed to duplicate a referential
Diffstat (limited to 'spec/controllers/lines_controller_spec.rb')
-rw-r--r--spec/controllers/lines_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/lines_controller_spec.rb b/spec/controllers/lines_controller_spec.rb
index 65fe88b96..96f49bb36 100644
--- a/spec/controllers/lines_controller_spec.rb
+++ b/spec/controllers/lines_controller_spec.rb
@@ -7,8 +7,8 @@ RSpec.describe LinesController, :type => :controller do
describe 'PUT deactivate' do
let(:request){ put :deactivate, id: line.id, line_referential_id: line_referential.id }
- it 'should redirect to 403' do
- expect(request).to redirect_to "/403"
+ it 'should respond with 403' do
+ expect(request).to have_http_status 403
end
with_permission "lines.change_status" do
@@ -24,8 +24,8 @@ RSpec.describe LinesController, :type => :controller do
before(:each){
line.deactivate!
}
- it 'should redirect to 403' do
- expect(request).to redirect_to "/403"
+ it 'should respond with 403' do
+ expect(request).to have_http_status 403
end
with_permission "lines.change_status" do