summaryrefslogtreecommitdiff
path: root/spec/helpers/projects_helper_spec.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-02-04 15:38:12 +0100
committerFrancisco Javier López <fjlopez@gitlab.com>2019-02-04 17:33:55 +0100
commit247bd122645175087251dda45169e38111dca52f (patch)
treebcc8a718b6751e714513743efac517e5e5b173eb /spec/helpers/projects_helper_spec.rb
parent6b0b14f81d6def6d74b303cd27fef6f98aaabfd0 (diff)
downloadgitlab-ce-247bd122645175087251dda45169e38111dca52f.tar.gz
Changed external wiki query method to prevent attribute caching
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r--spec/helpers/projects_helper_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 10f61731206..990750f0b2f 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -372,21 +372,16 @@ describe ProjectsHelper do
end
context 'when project has external wiki' do
- before do
- allow(project).to receive(:has_external_wiki?).and_return(true)
- end
-
it 'includes external wiki tab' do
+ project.create_external_wiki_service(active: true, properties: { 'external_wiki_url' => 'https://gitlab.com' })
+
is_expected.to include(:external_wiki)
end
end
context 'when project does not have external wiki' do
- before do
- allow(project).to receive(:has_external_wiki?).and_return(false)
- end
-
it 'does not include external wiki tab' do
+ expect(project.external_wiki).to be_nil
is_expected.not_to include(:external_wiki)
end
end