diff options
author | Markus Koller <mkoller@gitlab.com> | 2019-06-20 15:59:58 +0300 |
---|---|---|
committer | Markus Koller <mkoller@gitlab.com> | 2019-06-20 19:05:12 +0300 |
commit | 6905a62867067f2f61feb6734be3972cb5b9f7a7 (patch) | |
tree | ea953acc268cc1c747870ee88d2892a174b65878 /spec/features/search | |
parent | f4605ad880e9b76c94218cb7c4f16215c4f62e8e (diff) |
Build correct basenames for title search results
The "basename" here needs to be the full path without the trailing
extension, instead of stripping the leading path as well.
This was previously fixed in 2f36efa0871 inside the view, but the
problematic code was still present in FoundBlob, and the corresponding
spec didn't actually use a child wiki page to properly verify the fix.
Diffstat (limited to 'spec/features/search')
-rw-r--r-- | spec/features/search/user_searches_for_wiki_pages_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/features/search/user_searches_for_wiki_pages_spec.rb b/spec/features/search/user_searches_for_wiki_pages_spec.rb index 6d4facd0649..ee43755262e 100644 --- a/spec/features/search/user_searches_for_wiki_pages_spec.rb +++ b/spec/features/search/user_searches_for_wiki_pages_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'User searches for wiki pages', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository, :wiki_repo, namespace: user.namespace) } - let!(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'test_wiki', content: 'Some Wiki content' }) } + let!(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'directory/title', content: 'Some Wiki content' }) } before do project.add_maintainer(user) @@ -22,7 +22,7 @@ describe 'User searches for wiki pages', :js do click_link(project.full_name) end - fill_in('dashboard_search', with: 'content') + fill_in('dashboard_search', with: search_term) find('.btn-search').click page.within('.search-filter') do @@ -43,7 +43,7 @@ describe 'User searches for wiki pages', :js do context 'when searching by title' do it_behaves_like 'search wiki blobs' do - let(:search_term) { 'test_wiki' } + let(:search_term) { 'title' } end end end |