diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2018-12-13 22:26:56 +0300 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2019-02-27 13:52:35 +0300 |
commit | 5ae9a44aa17c8929627cc450f936cd960c143e25 (patch) | |
tree | 6a14d388f5687979a683d443868b4297ebc6838c /spec/models/project_spec.rb | |
parent | 6fa88ed77e1693cda845efe49bf2c9a77aed2e4f (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.rb | 12 |
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) } |