summaryrefslogtreecommitdiff
path: root/spec/helpers/search_helper_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-06-13 23:39:39 +0000
committerMike Greiling <mike@pixelcog.com>2019-06-13 23:39:39 +0000
commit14b0a4627211dd123afe1381da5fe093408836ee (patch)
tree57ff8b4ac89771fdf5f836bc83da407d396683fb /spec/helpers/search_helper_spec.rb
parentd8b361aff274e4b9c010a483add693af15b51371 (diff)
downloadgitlab-ce-14b0a4627211dd123afe1381da5fe093408836ee.tar.gz
Use scoped routes for labels and milestones
Update frontend code to use /-/ scope for milestones and labels routes Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/helpers/search_helper_spec.rb')
-rw-r--r--spec/helpers/search_helper_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index 2f59cfda0a0..da14f7f16fb 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -113,8 +113,10 @@ describe SearchHelper do
expect(search_filter_input_options('')[:data]['project-id']).to eq(@project.id)
end
- it 'includes project base-endpoint' do
+ it 'includes project endpoints' do
expect(search_filter_input_options('')[:data]['base-endpoint']).to eq(project_path(@project))
+ expect(search_filter_input_options('')[:data]['labels-endpoint']).to eq(project_labels_path(@project))
+ expect(search_filter_input_options('')[:data]['milestones-endpoint']).to eq(project_milestones_path(@project))
end
it 'includes autocomplete=off flag' do
@@ -131,8 +133,10 @@ describe SearchHelper do
expect(search_filter_input_options('')[:data]['project-id']).to eq(nil)
end
- it 'includes group base-endpoint' do
+ it 'includes group endpoints' do
expect(search_filter_input_options('')[:data]['base-endpoint']).to eq("/groups#{group_path(@group)}")
+ expect(search_filter_input_options('')[:data]['labels-endpoint']).to eq(group_labels_path(@group))
+ expect(search_filter_input_options('')[:data]['milestones-endpoint']).to eq(group_milestones_path(@group))
end
end
@@ -142,8 +146,10 @@ describe SearchHelper do
expect(search_filter_input_options('')[:data]['group-id']).to eq(nil)
end
- it 'includes dashboard base-endpoint' do
+ it 'includes dashboard endpoints' do
expect(search_filter_input_options('')[:data]['base-endpoint']).to eq("/dashboard")
+ expect(search_filter_input_options('')[:data]['labels-endpoint']).to eq(dashboard_labels_path)
+ expect(search_filter_input_options('')[:data]['milestones-endpoint']).to eq(dashboard_milestones_path)
end
end
end