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

Fixed tests

parent fdc94907
...@@ -274,12 +274,12 @@ module ApplicationHelper ...@@ -274,12 +274,12 @@ module ApplicationHelper
end end
end end
params = options.compact.to_param params = options.compact
path = request.path path = request.path
if params != nil if params != nil
path << "?#{params}" path << "?#{params.to_param}"
if add_label if add_label
if params[:label_name].present? and params[:label_name].respond_to?('any?') if params[:label_name].present? and params[:label_name].respond_to?('any?')
params[:label_name].each do |label| params[:label_name].each do |label|
......
...@@ -10,31 +10,22 @@ ...@@ -10,31 +10,22 @@
%li %li
= link_to page_filter_path(sort: sort_value_recently_created) do = link_to page_filter_path(sort: sort_value_recently_created) do
= sort_title_recently_created = sort_title_recently_created
%li
= link_to page_filter_path(sort: sort_value_oldest_created) do = link_to page_filter_path(sort: sort_value_oldest_created) do
= sort_title_oldest_created = sort_title_oldest_created
%li
= link_to page_filter_path(sort: sort_value_recently_updated) do = link_to page_filter_path(sort: sort_value_recently_updated) do
= sort_title_recently_updated = sort_title_recently_updated
%li
= link_to page_filter_path(sort: sort_value_oldest_updated) do = link_to page_filter_path(sort: sort_value_oldest_updated) do
= sort_title_oldest_updated = sort_title_oldest_updated
%li
= link_to page_filter_path(sort: sort_value_milestone_soon) do = link_to page_filter_path(sort: sort_value_milestone_soon) do
= sort_title_milestone_soon = sort_title_milestone_soon
%li
= link_to page_filter_path(sort: sort_value_milestone_later) do = link_to page_filter_path(sort: sort_value_milestone_later) do
= sort_title_milestone_later = sort_title_milestone_later
- if controller.controller_name == 'issues' || controller.action_name == 'issues' - if controller.controller_name == 'issues' || controller.action_name == 'issues'
%li
= link_to page_filter_path(sort: sort_value_due_date_soon) do = link_to page_filter_path(sort: sort_value_due_date_soon) do
= sort_title_due_date_soon = sort_title_due_date_soon
%li
= link_to page_filter_path(sort: sort_value_due_date_later) do = link_to page_filter_path(sort: sort_value_due_date_later) do
= sort_title_due_date_later = sort_title_due_date_later
%li
= link_to page_filter_path(sort: sort_value_upvotes) do = link_to page_filter_path(sort: sort_value_upvotes) do
= sort_title_upvotes = sort_title_upvotes
%li
= link_to page_filter_path(sort: sort_value_downvotes) do = link_to page_filter_path(sort: sort_value_downvotes) do
= sort_title_downvotes = sort_title_downvotes
...@@ -167,8 +167,7 @@ describe 'Filter issues', feature: true do ...@@ -167,8 +167,7 @@ describe 'Filter issues', feature: true do
project: project, project: project,
milestone: milestone, milestone: milestone,
author: user, author: user,
assignee: user assignee: user)
)
issue.labels << project.labels.find_by(title: 'bug') issue.labels << project.labels.find_by(title: 'bug')
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
...@@ -265,7 +264,7 @@ describe 'Filter issues', feature: true do ...@@ -265,7 +264,7 @@ describe 'Filter issues', feature: true do
describe 'filter issues and sort', js: true do describe 'filter issues and sort', js: true do
before 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_one = create(:issue, title: "Frontend", project: project)
bug_two = create(:issue, title: "Bug 2", 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