diff options
author | Valery Sizov <valery@gitlab.com> | 2018-09-25 16:29:17 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2018-09-25 17:49:39 +0300 |
commit | 15d011d64d579616dd9df3e3e5082ed5b99bcdf8 (patch) | |
tree | cb89f3316d037e19ddc5e1b39fdf37955313e103 /spec/models/project_feature_spec.rb | |
parent | cb0f024cd4c4aa51c7824e4e1a6c4d0f307afad1 (diff) | |
download | gitlab-ce-15d011d64d579616dd9df3e3e5082ed5b99bcdf8.tar.gz |
Geo: sync disabled wikis. Stage 2follow-up-geo-sync-disabled-wikis
We started syncing all the wiki regardless of the fact it's disabled or
not. We couldn't do that in one stage because of needing of smoth update
and deprecating things. This is the second stage that finally removes
unused columns in the geo_node_status table.
Diffstat (limited to 'spec/models/project_feature_spec.rb')
-rw-r--r-- | spec/models/project_feature_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/models/project_feature_spec.rb b/spec/models/project_feature_spec.rb index 10617edec0f..cd7f77024da 100644 --- a/spec/models/project_feature_spec.rb +++ b/spec/models/project_feature_spec.rb @@ -119,46 +119,4 @@ describe ProjectFeature do end end end - - context 'Site Statistics' do - set(:project_with_wiki) { create(:project, :wiki_enabled) } - set(:project_without_wiki) { create(:project, :wiki_disabled) } - - context 'when creating a project' do - it 'tracks wiki availability when wikis are enabled by default' do - expect { create(:project) }.to change { SiteStatistic.fetch.wikis_count }.by(1) - end - - it 'does not track wiki availability when wikis are disabled by default' do - expect { create(:project, :wiki_disabled) }.not_to change { SiteStatistic.fetch.wikis_count } - end - end - - context 'when updating a project_feature' do - it 'untracks wiki availability when disabling wiki access' do - expect { project_with_wiki.project_feature.update_attribute(:wiki_access_level, ProjectFeature::DISABLED) } - .to change { SiteStatistic.fetch.wikis_count }.by(-1) - end - - it 'tracks again wiki availability when re-enabling wiki access as public' do - expect { project_without_wiki.project_feature.update_attribute(:wiki_access_level, ProjectFeature::ENABLED) } - .to change { SiteStatistic.fetch.wikis_count }.by(1) - end - - it 'tracks again wiki availability when re-enabling wiki access as private' do - expect { project_without_wiki.project_feature.update_attribute(:wiki_access_level, ProjectFeature::PRIVATE) } - .to change { SiteStatistic.fetch.wikis_count }.by(1) - end - end - - context 'when removing a project' do - it 'untracks wiki availability when removing a project with previous wiki access' do - expect { project_with_wiki.destroy }.to change { SiteStatistic.fetch.wikis_count }.by(-1) - end - - it 'does not untrack wiki availability when removing a project without wiki access' do - expect { project_without_wiki.destroy }.not_to change { SiteStatistic.fetch.wikis_count } - end - end - end end |