From f7bc874de79ff9a68aa03523cf653407663e7c55 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 11 Sep 2017 09:41:03 +0200 Subject: 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 --- spec/policies/route_policy_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/policies/route_policy_spec.rb') 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 -- cgit v1.2.3