Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 06:06:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 06:06:01 +0300
commit8c7eab92cd0009f55cb999bbade43e0f969c137e (patch)
tree180cac6632448a211ddbe555191574c98e8dc385 /spec/helpers/wiki_helper_spec.rb
parentdffeff5520e861dc6e7319b690c573186bbbd22e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/wiki_helper_spec.rb')
-rw-r--r--spec/helpers/wiki_helper_spec.rb21
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/helpers/wiki_helper_spec.rb b/spec/helpers/wiki_helper_spec.rb
index bcc2bd71da1..4310e4bd22c 100644
--- a/spec/helpers/wiki_helper_spec.rb
+++ b/spec/helpers/wiki_helper_spec.rb
@@ -23,8 +23,13 @@ describe WikiHelper do
describe '#wiki_sort_controls' do
let(:project) { create(:project) }
- let(:wiki_link) { helper.wiki_sort_controls(project, sort, direction) }
- let(:classes) { "btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort rspec-reverse-sort" }
+ let(:classes) { described_class::WIKI_SORT_CSS_CLASSES }
+
+ subject(:wiki_link) do
+ helper.wiki_sort_controls(sort: sort, direction: direction) do |opts|
+ project_wikis_pages_path(project, opts)
+ end
+ end
def expected_link(sort, direction, icon_class)
path = "/#{project.full_path}/wikis/pages?direction=#{direction}&sort=#{sort}"
@@ -62,6 +67,18 @@ describe WikiHelper do
end
end
+ describe '#wiki_show_children_icon' do
+ ProjectWiki::NESTINGS.each do |nesting|
+ context "When the nesting parameter is `#{nesting}`" do
+ let(:element) { helper.wiki_show_children_icon(nesting) }
+
+ it 'produces something that contains an SVG' do
+ expect(element).to match(/svg/)
+ end
+ end
+ end
+ end
+
describe '#wiki_sort_title' do
it 'returns a title corresponding to a key' do
expect(helper.wiki_sort_title('created_at')).to eq('Created date')