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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 15:09:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 15:09:20 +0300
commitb84eeb256c4a780d902faee1f99ca9a711b3214a (patch)
tree32918aadbea9210eace50efbce9afbfb8cd3ba84 /spec/models/project_spec.rb
parent53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index dc055244af7..6c90a1b5614 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -153,6 +153,16 @@ describe Project do
expect(project.container_expiration_policy).to be_persisted
end
+ it 'does not create another container expiration policy if there is already one' do
+ project = build(:project)
+
+ expect do
+ container_expiration_policy = create(:container_expiration_policy, project: project)
+
+ expect(project.container_expiration_policy).to eq(container_expiration_policy)
+ end.to change { ContainerExpirationPolicy.count }.by(1)
+ end
+
it 'automatically creates a Pages metadata row' do
expect(project.pages_metadatum).to be_an_instance_of(ProjectPagesMetadatum)
expect(project.pages_metadatum).to be_persisted