Skip to content
Snippets Groups Projects
Unverified Commit 6f115937 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix bug when links in tabs of the labels index pages ends with .html

parent 11611708
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -143,7 +143,7 @@ module LabelsHelper
 
def labels_filter_path(options = {})
project = @target_project || @project
format = options.delete(:format) || :html
format = options.delete(:format)
 
if project
project_labels_path(project, format, options)
Loading
Loading
---
title: Fix bug when links in tabs of the labels index pages ends with .html
merge_request: 22716
author:
type: fixed
Loading
Loading
@@ -211,4 +211,29 @@ describe LabelsHelper do
end
end
end
describe 'labels_filter_path' do
let(:group) { create(:group) }
let(:project) { create(:project) }
it 'links to the dashboard labels page' do
expect(labels_filter_path).to eq(dashboard_labels_path)
end
it 'links to the group labels page' do
assign(:group, group)
expect(helper.labels_filter_path).to eq(group_labels_path(group))
end
it 'links to the group labels page' do
assign(:project, project)
expect(helper.labels_filter_path).to eq(project_labels_path(project))
end
it 'supports json format' do
expect(labels_filter_path(format: :json)).to eq(dashboard_labels_path(format: :json))
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment