Lines Matching refs:repository
7 let(:repository) { permission.item }
11 it 'should allow read on public readable repository' do
12 repository.access = 'public_r'
13 access = described_class.determine_permission('read', nil, repository)
17 it 'should disallow write on public readable repository' do
18 repository.access = 'public_r'
19 access = described_class.determine_permission('write', nil, repository)
23 it 'should allow read on public read-writeable repository' do
24 repository.access = 'public_rw'
25 access = described_class.determine_permission('read', nil, repository)
29 it 'should allow write on public read-writeable repository' do
30 repository.access = 'public_rw'
31 access = described_class.determine_permission('write', nil, repository)
35 it 'should disallow read on private readable repository' do
36 repository.access = 'private_r'
37 access = described_class.determine_permission('read', nil, repository)
41 it 'should disallow write on private readable repository' do
42 repository.access = 'private_r'
43 access = described_class.determine_permission('write', nil, repository)
47 it 'should disallow read on private read-writeable repository' do
48 repository.access = 'private_rw'
49 access = described_class.determine_permission('read', nil, repository)
53 it 'should disallow write on private read-writeable repository' do
54 repository.access = 'private_rw'
55 access = described_class.determine_permission('write', nil, repository)
59 it 'should raise error on write to mirror repository' do
60 repository.source_address = 'http://some_source_address.example.com'
61 repository.source_type = 'git'
62 repository.remote_type = 'mirror'
63 expect { described_class.determine_permission('write', nil, repository) }.
74 it 'should allow write on public readable repository' do
75 repository.access = 'public_r'
76 access = described_class.determine_permission('write', permission, repository)
80 it 'should allow write on private readable repository' do
81 repository.access = 'private_r'
82 access = described_class.determine_permission('write', permission, repository)
86 it 'should raise error on write to mirror repository' do
87 repository.source_address = 'http://some_source_address.example.com'
88 repository.source_type = 'git'
89 repository.remote_type = 'mirror'
90 expect { described_class.determine_permission('write', permission, repository) }.
98 it 'should allow write on public readable repository' do
99 repository.access = 'public_r'
100 access = described_class.determine_permission('write', permission, repository)
104 it 'should allow write on private readable repository' do
105 repository.access = 'private_r'
106 access = described_class.determine_permission('write', permission, repository)
110 it 'should raise error on write to mirror repository' do
111 repository.source_address = 'http://some_source_address.example.com'
112 repository.source_type = 'git'
113 repository.remote_type = 'mirror'
114 expect { described_class.determine_permission('write', permission, repository) }.
119 it 'should allow read on public readable repository' do
120 repository.access = 'public_r'
121 access = described_class.determine_permission('read', permission, repository)
125 it 'should disallow write on public readable repository' do
126 repository.access = 'public_r'
127 access = described_class.determine_permission('write', permission, repository)
131 it 'should allow read on public read-writeable repository' do
132 repository.access = 'public_rw'
133 access = described_class.determine_permission('read', permission, repository)
137 it 'should allow write on public read-writeable repository' do
138 repository.access = 'public_rw'
139 access = described_class.determine_permission('write', permission, repository)
143 it 'should allow read on private readable repository' do
144 repository.access = 'private_r'
145 access = described_class.determine_permission('read', permission, repository)
149 it 'should disallow write on private readable repository' do
150 repository.access = 'private_r'
151 access = described_class.determine_permission('write', permission, repository)
155 it 'should allow read on private read-writeable repository' do
156 repository.access = 'private_rw'
157 access = described_class.determine_permission('read', permission, repository)
161 it 'should allow write on private read-writeable repository' do
162 repository.access = 'private_rw'
163 access = described_class.determine_permission('write', permission, repository)
167 it 'should raise error on write to mirror repository' do
168 repository.source_address = 'http://some_source_address.example.com'
169 repository.source_type = 'git'
170 repository.remote_type = 'mirror'
171 expect { described_class.determine_permission('write', permission, repository) }.