Lines Matching refs:create
6 let(:user){ create :user } # regular user
7 let(:owner){ create :user } # owner
10 let(:editor) { create :user } # editor
11 let(:reader) { create :user } # reader
12 let(:item) { create(:permission, subject: owner, role: 'owner').item }
15 create(:permission, subject: editor, role: 'editor', item: item)
16 create(:permission, subject: reader, role: 'reader', item: item)
22 it 'not be allowed: new, create' do
23 %i(new create).each do |perm|
42 it 'be allowed: new, create' do
43 %i(new create).each do |perm|
55 should be_able_to(:show, create(:repository))
62 it 'be allowed: new, create' do
63 %i(new create).each do |perm|
76 should_not be_able_to(perm, create(:repository))
99 let(:editor){ create :user } # editor
100 let(:reader){ create :user } # reader
101 let!(:access_token) { create :access_token }
104 create(:permission, subject: owner, role: 'owner', item: repo)
109 create(:permission, subject: editor, role: 'editor', item: item)
110 create(:permission, subject: reader, role: 'reader', item: item)
176 let(:editor) { create :user } # editor
177 let(:reader) { create :user } # reader
178 let(:item) { create(:repository, access: 'private_rw', user: owner) }
181 create(:permission, subject: editor, role: 'editor', item: item)
182 create(:permission, subject: reader, role: 'reader', item: item)
233 let(:other){ create :user }
234 let(:memberteam){ create(:team_user, user: other).team }
235 let(:otherteam){ create(:team_user, user: other).team }
244 should be_able_to(perm, create(:team_user, user: user).team)
250 it 'be allowed: create, show, index' do
251 %i(create show index).each do |perm|
271 let(:comment){ create :comment }
281 should_not be_able_to(:destroy, create(:comment))
286 subject(:ability){ Ability.new(create(:admin), nil) }
297 create(:permission, subject: owner, role: 'owner', item: comment.commentable.repository)
308 create(:permission, subject: owner, role: 'editor', item: comment.commentable.repository)