summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 06:08:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 06:08:27 +0000
commit36c3f8296f0309642d3b41b7d0e0333e50ac75a6 (patch)
tree86fc05e07f33599ae15319251d17b5060c6c52af /spec/models
parente8d7ac4f14bcc70921ea9d63c75cd2e7f2cd5c31 (diff)
downloadgitlab-ce-36c3f8296f0309642d3b41b7d0e0333e50ac75a6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/container_expiration_policy_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/container_expiration_policy_spec.rb b/spec/models/container_expiration_policy_spec.rb
index 7d9c7638897..588685b04bf 100644
--- a/spec/models/container_expiration_policy_spec.rb
+++ b/spec/models/container_expiration_policy_spec.rb
@@ -103,4 +103,14 @@ RSpec.describe ContainerExpirationPolicy, type: :model do
end
end
end
+
+ describe '#disable!' do
+ let_it_be(:container_expiration_policy) { create(:container_expiration_policy) }
+
+ subject { container_expiration_policy.disable! }
+
+ it 'disables the container expiration policy' do
+ expect { subject }.to change { container_expiration_policy.reload.enabled }.from(true).to(false)
+ end
+ end
end