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:
authorJacopo <beschi.jacopo@gmail.com>2018-12-13 22:26:56 +0300
committerJacopo <beschi.jacopo@gmail.com>2019-02-27 13:52:35 +0300
commit5ae9a44aa17c8929627cc450f936cd960c143e25 (patch)
tree6a14d388f5687979a683d443868b4297ebc6838c /spec/models/project_spec.rb
parent6fa88ed77e1693cda845efe49bf2c9a77aed2e4f (diff)
Add project http fetch statistics API
The API get projects/:id/traffic/fetches allows user with write access to the repository to get the number of clones for the last 30 days.
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 1f9088c2e6b..4a218cdc24f 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -2335,6 +2335,18 @@ describe Project do
end
end
+ describe '#daily_statistics_enabled?' do
+ it { is_expected.to be_daily_statistics_enabled }
+
+ context 'when :project_daily_statistics is disabled for the project' do
+ before do
+ stub_feature_flags(project_daily_statistics: { thing: subject, enabled: false })
+ end
+
+ it { is_expected.not_to be_daily_statistics_enabled }
+ end
+ end
+
describe '#change_head' do
let(:project) { create(:project, :repository) }