Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-04 13:57:38 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-04 13:57:38 +0300
commitcb2ce8452fe2e9e156add5ccfe8fd2ec5cda9ace (patch)
tree260585123547b6bc30bf537fc9463a37b2b239aa /spec/models/container_repository_spec.rb
parent1c91d52a70407e15f9b106bafc6505895214f3b8 (diff)
Remove legacy registry tags when deleting a project
Diffstat (limited to 'spec/models/container_repository_spec.rb')
-rw-r--r--spec/models/container_repository_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/container_repository_spec.rb b/spec/models/container_repository_spec.rb
index 1a29cc9a096..3e6082ec326 100644
--- a/spec/models/container_repository_spec.rb
+++ b/spec/models/container_repository_spec.rb
@@ -195,4 +195,22 @@ describe ContainerRepository do
end
end
end
+
+ describe '.build_root_repository' do
+ let(:repository) do
+ described_class.build_root_repository(project)
+ end
+
+ it 'fabricates a root repository object' do
+ expect(repository).to be_root_repository
+ end
+
+ it 'assignes it to the correct project' do
+ expect(repository.project).to eq project
+ end
+
+ it 'does not persist it' do
+ expect(repository).not_to be_persisted
+ end
+ end
end