blob: 5dc8be76f208545e556f0f4a50ec85d40cbce150 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
RSpec.describe Chouette::RoutePolicy, type: :policy do
let( :record ){ build_stubbed :route }
permissions :create? do
it_behaves_like 'permitted policy and same organisation', 'routes.create', archived_and_finalised: true
end
permissions :duplicate? do
it_behaves_like 'permitted policy and same organisation', 'routes.create', archived_and_finalised: true
end
permissions :destroy? do
it_behaves_like 'permitted policy and same organisation', 'routes.destroy', archived_and_finalised: true
end
permissions :edit? do
it_behaves_like 'permitted policy and same organisation', 'routes.update', archived_and_finalised: true
end
permissions :new? do
it_behaves_like 'permitted policy and same organisation', 'routes.create', archived_and_finalised: true
end
permissions :update? do
it_behaves_like 'permitted policy and same organisation', 'routes.update', archived_and_finalised: true
end
end
|