summaryrefslogtreecommitdiff
path: root/spec/models/project_wiki_spec.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-13 17:34:27 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-07-13 17:34:27 +0800
commitd9f26586b4ec00c00fb470e55af3dc5c1f4ce33a (patch)
tree1a16bb35e6b103042ed405dcb37227c4dc44244f /spec/models/project_wiki_spec.rb
parent99c80156ae6058f70fde77baabd5f007f0246e6d (diff)
parenta3c8525dc9a69d0e1048c114fd27317dcffc4221 (diff)
downloadgitlab-ce-d9f26586b4ec00c00fb470e55af3dc5c1f4ce33a.tar.gz
Merge remote-tracking branch 'upstream/master' into 14995-custom_wiki_sidebar
* upstream/master: (467 commits) Update docs board features tier Upgrade grape-path-helpers to 1.0.6 Remove healthchecks from prometheus endpoint Fix find_branch call sites Ensure Encoding.default_external is set to UTF-8 when running QA scenarios i18n: externalize strings from 'app/views/admin/groups' Backport mr widget changes from EE Allow to toggle notifications for issues due soon Vuex test helper improvements whitespace Make more ref RPC's mandatory Resolve "Improve performance of MR Changes tab: reduce event listeners on scroll event" Remove old service architecture from Vue docs Adding spec to test basic forking functionalities Fix performance problem of accessing tag list for projects api endpoints typo Add sleep to QA test before installing tiller Include Vue files that are not covered by tests in test coverage Remove Repository#path memoization Resolve "do not set updated_at when creating note" ...
Diffstat (limited to 'spec/models/project_wiki_spec.rb')
-rw-r--r--spec/models/project_wiki_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb
index 942cd47325d..528f5b610d7 100644
--- a/spec/models/project_wiki_spec.rb
+++ b/spec/models/project_wiki_spec.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
require "spec_helper"
describe ProjectWiki do
@@ -10,7 +11,6 @@ describe ProjectWiki do
subject { project_wiki }
- it { is_expected.to delegate_method(:empty?).to :pages }
it { is_expected.to delegate_method(:repository_storage).to :project }
it { is_expected.to delegate_method(:hashed_storage?).to :project }
@@ -92,11 +92,19 @@ describe ProjectWiki do
context "when the wiki has pages" do
before do
project_wiki.create_page("index", "This is an awesome new Gollum Wiki")
+ project_wiki.create_page("another-page", "This is another page")
end
describe '#empty?' do
subject { super().empty? }
it { is_expected.to be_falsey }
+
+ # Re-enable this when https://gitlab.com/gitlab-org/gitaly/issues/1204 is fixed
+ xit 'only instantiates a Wiki page once' do
+ expect(WikiPage).to receive(:new).once.and_call_original
+
+ subject
+ end
end
end
end