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:
Diffstat (limited to 'spec/models/concerns/counter_attribute_spec.rb')
-rw-r--r--spec/models/concerns/counter_attribute_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/concerns/counter_attribute_spec.rb b/spec/models/concerns/counter_attribute_spec.rb
index 8d32ef14f47..2dd70188740 100644
--- a/spec/models/concerns/counter_attribute_spec.rb
+++ b/spec/models/concerns/counter_attribute_spec.rb
@@ -79,4 +79,14 @@ RSpec.describe CounterAttribute, :counter_attribute, :clean_gitlab_redis_shared_
end
end
end
+
+ describe '.counter_attribute_enabled?' do
+ it 'is true when counter attribute is defined' do
+ expect(CounterAttributeModel.counter_attribute_enabled?(:build_artifacts_size)).to be_truthy
+ end
+
+ it 'is false when counter attribute is not defined' do
+ expect(CounterAttributeModel.counter_attribute_enabled?(:nope)).to be_falsey
+ end
+ end
end