Commit 1a086745 authored by Phil Hughes's avatar Phil Hughes

Fixed tests

parent fdc94907
......@@ -274,12 +274,12 @@ module ApplicationHelper
end
end
params = options.compact.to_param
params = options.compact
path = request.path
if params != nil
path << "?#{params}"
path << "?#{params.to_param}"
if add_label
if params[:label_name].present? and params[:label_name].respond_to?('any?')
params[:label_name].each do |label|
......
......@@ -10,31 +10,22 @@
%li
= link_to page_filter_path(sort: sort_value_recently_created) do
= sort_title_recently_created
%li
= link_to page_filter_path(sort: sort_value_oldest_created) do
= sort_title_oldest_created
%li
= link_to page_filter_path(sort: sort_value_recently_updated) do
= sort_title_recently_updated
%li
= link_to page_filter_path(sort: sort_value_oldest_updated) do
= sort_title_oldest_updated
%li
= link_to page_filter_path(sort: sort_value_milestone_soon) do
= sort_title_milestone_soon
%li
= link_to page_filter_path(sort: sort_value_milestone_later) do
= sort_title_milestone_later
- if controller.controller_name == 'issues' || controller.action_name == 'issues'
%li
- if controller.controller_name == 'issues' || controller.action_name == 'issues'
= link_to page_filter_path(sort: sort_value_due_date_soon) do
= sort_title_due_date_soon
%li
= link_to page_filter_path(sort: sort_value_due_date_later) do
= sort_title_due_date_later
%li
= link_to page_filter_path(sort: sort_value_upvotes) do
= sort_title_upvotes
%li
= link_to page_filter_path(sort: sort_value_downvotes) do
= sort_title_downvotes
......@@ -167,8 +167,7 @@ describe 'Filter issues', feature: true do
project: project,
milestone: milestone,
author: user,
assignee: user
)
assignee: user)
issue.labels << project.labels.find_by(title: 'bug')
visit namespace_project_issues_path(project.namespace, project)
......@@ -265,7 +264,7 @@ describe 'Filter issues', feature: true do
describe 'filter issues and sort', js: true do
before do
label = create(:label, project: project, title: 'bug')
create(:label, project: project, title: 'bug')
bug_one = create(:issue, title: "Frontend", project: project)
bug_two = create(:issue, title: "Bug 2", project: project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment