diff options
| author | Robert | 2017-09-11 09:41:03 +0200 | 
|---|---|---|
| committer | Robert | 2017-09-11 17:15:49 +0200 | 
| commit | f7bc874de79ff9a68aa03523cf653407663e7c55 (patch) | |
| tree | 1716586822ad9b9912e44f658193e5c1aea04e88 /spec/policies | |
| parent | 003c4689248673fbc8922a107475caa9e059bcab (diff) | |
| download | chouette-core-f7bc874de79ff9a68aa03523cf653407663e7c55.tar.bz2 | |
Fixes #4189@4h Route Duplication
* Duplication of Route is triggered by link and UI forwarded to edit of duplicatee
     - Changing route, only POST duplicate_referential_line_route --> RoutesController#duplicate
     - Removing route       GET  duplicate_referential_line_route --> RoutesController#duplicate
     - Removing controller action RoutesController#post_duplicate
* Link in Route Decorator depends on new policy RoutePolicy#decorate?
* Adapting specs
Diffstat (limited to 'spec/policies')
| -rw-r--r-- | spec/policies/route_policy_spec.rb | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/spec/policies/route_policy_spec.rb b/spec/policies/route_policy_spec.rb index 243d85acb..d7edceaef 100644 --- a/spec/policies/route_policy_spec.rb +++ b/spec/policies/route_policy_spec.rb @@ -6,6 +6,10 @@ RSpec.describe RoutePolicy, type: :policy do      it_behaves_like 'permitted policy and same organisation', 'routes.create', archived: true    end +  permissions :duplicate? do +    it_behaves_like 'permitted policy and same organisation', 'routes.create', archived: true +  end +    permissions :destroy? do      it_behaves_like 'permitted policy and same organisation', 'routes.destroy', archived: true    end | 
