aboutsummaryrefslogtreecommitdiffstats
path: root/spec/policies/referential_policy_spec.rb
diff options
context:
space:
mode:
authorRobert2018-01-05 17:34:07 +0100
committerRobert2018-01-08 08:35:28 +0100
commitfb9eb367b9c56c19df7f2e2301f4a417f5409d6d (patch)
tree1cdeb3efed78959d83d6b0547eb94293648d2c42 /spec/policies/referential_policy_spec.rb
parentdcc56c4d02f9f71b13dd38251367306842cd10c7 (diff)
downloadchouette-core-fb9eb367b9c56c19df7f2e2301f4a417f5409d6d.tar.bz2
Refs: #5413@4h; Setting up db (chore) and specing desired behavior [skip-ci]
- Adapted shared pundit examples to allow to check with archieved and finalised referentials - Speced desired behavior with this enhancement - finalise_referential helper in policy spec's support
Diffstat (limited to 'spec/policies/referential_policy_spec.rb')
-rw-r--r--spec/policies/referential_policy_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/policies/referential_policy_spec.rb b/spec/policies/referential_policy_spec.rb
index d00415fc6..8540d3ce9 100644
--- a/spec/policies/referential_policy_spec.rb
+++ b/spec/policies/referential_policy_spec.rb
@@ -32,13 +32,13 @@ RSpec.describe ReferentialPolicy, type: :policy do
# ---------------------------------------
permissions :destroy? do
- it_behaves_like 'permitted policy and same organisation', 'referentials.destroy', archived: true
+ it_behaves_like 'permitted policy and same organisation', 'referentials.destroy', archived_and_finalised: true
end
permissions :edit? do
- it_behaves_like 'permitted policy and same organisation', 'referentials.update', archived: true
+ it_behaves_like 'permitted policy and same organisation', 'referentials.update', archived_and_finalised: true
end
permissions :update? do
- it_behaves_like 'permitted policy and same organisation', 'referentials.update', archived: true
+ it_behaves_like 'permitted policy and same organisation', 'referentials.update', archived_and_finalised: true
end
#
@@ -46,7 +46,7 @@ RSpec.describe ReferentialPolicy, type: :policy do
# ------------------
permissions :clone? do
- it_behaves_like 'permitted policy', 'referentials.create', archived: true
+ it_behaves_like 'permitted policy', 'referentials.create', archived_and_finalised: true
end
permissions :archive? do