blob: 3ec177209ffbbe0255a9d4407d57b1f899820b6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
RSpec.describe ApplicationPolicy, type: :policy do
permissions :organisation_match? do
it "denies a user with a different organisation" do
expect_it.not_to permit(user_context, referential)
end
it "allows a user with a different organisation" do
user.organisation = referential.organisation
expect_it.to permit(user_context, referential)
end
end
end
|