blob: df2e41a89889025068cd70d9f2b928bab3378ba2 (
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: 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
permissions :edit? do
it_behaves_like 'permitted policy and same organisation', 'routes.update', archived: true
end
permissions :new? do
it_behaves_like 'permitted policy and same organisation', 'routes.create', archived: true
end
permissions :update? do
it_behaves_like 'permitted policy and same organisation', 'routes.update', archived: true
end
end
|