diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-08-26 23:20:00 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-08-26 23:20:00 +0300 |
commit | 6686084c6502f10fd7e6b8963ab52526cb6831bf (patch) | |
tree | 7d15178ef2e6097671b869cf3749897089d514b5 /spec/models/ability_spec.rb | |
parent | 0e3c7b2f2a5742216eda2d2cf6df9a5ea5f866ff (diff) |
Fix "Wiki" link not appearing in navigation for projects with external wiki
Diffstat (limited to 'spec/models/ability_spec.rb')
-rw-r--r-- | spec/models/ability_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb index aa3b2bbf471..c50ca38bdd9 100644 --- a/spec/models/ability_spec.rb +++ b/spec/models/ability_spec.rb @@ -282,4 +282,17 @@ describe Ability, lib: true do end end end + + describe '.project_disabled_features_rules' do + let(:project) { build(:project) } + + subject { described_class.project_disabled_features_rules(project) } + + context 'wiki named abilities' do + it 'disables wiki abilities if the project has no wiki' do + expect(project).to receive(:has_wiki?).and_return(false) + expect(subject).to include(:read_wiki, :create_wiki, :update_wiki, :admin_wiki) + end + end + end end |