Lines Matching refs:repository
11 let(:repository) { create :repository, user: user }
13 context 'a repository with a reserved name should be invalid' do
15 build :repository, user: user, name: 'repositories'
29 context 'when trying to rename a repository' do
31 repository.name = "#{repository.name}addition"
32 expect { repository.save! }.to raise_error(ActiveRecord::RecordInvalid)
36 context 'when deleting a repository', :process_jobs_synchronously do
37 let (:ontology) { create :ontology, repository: repository }
41 importing = create :ontology, repository: repository
44 repository.destroy_asynchronously
52 repository2 = create :repository
53 importing = create :ontology, repository: repository2
55 expect { repository.destroy_asynchronously }.to(
62 repository.destroy_asynchronously
64 expect { repository.reload }.
72 let(:permission) { repository.permissions.first }
92 repository.access = 'private_rw'
93 repository.save
95 create(:permission, subject: editor, role: 'editor', item: repository)
96 readers.each { |r| create(:permission, subject: r, role: 'reader', item: repository) }
101 expect(repository.permissions.where(role: 'reader').count).to eq(3)
106 repository.name += "_foo"
107 repository.save
110 expect(repository.permissions.where(role: 'reader').count). to eq(3)
117 expect(repository.permissions.where(role: 'reader').count).to eq(3)
122 repository.access = 'public_r'
123 repository.save
127 expect(repository.permissions.where(role: 'reader').count). to eq(0)