Merge pull request #1247 from tsigo/feature/no_milestone_filter
Allow filtering issues that have no milestone or assignee
This commit is contained in:
commit
4ce034ca65
4 changed files with 69 additions and 4 deletions
|
@ -89,4 +89,53 @@ describe "Issues" do
|
|||
page.should have_content 'gitlab'
|
||||
end
|
||||
end
|
||||
|
||||
describe "Filter issue" do
|
||||
before do
|
||||
['foobar', 'barbaz', 'gitlab'].each do |title|
|
||||
@issue = Factory :issue,
|
||||
author: @user,
|
||||
assignee: @user,
|
||||
project: project,
|
||||
title: title
|
||||
end
|
||||
|
||||
@issue = Issue.first
|
||||
@issue.milestone = Factory(:milestone, project: project)
|
||||
@issue.assignee = nil
|
||||
@issue.save
|
||||
end
|
||||
|
||||
it "should allow filtering by issues with no specified milestone" do
|
||||
visit project_issues_path(project, milestone_id: '0')
|
||||
|
||||
page.should_not have_content 'foobar'
|
||||
page.should have_content 'barbaz'
|
||||
page.should have_content 'gitlab'
|
||||
end
|
||||
|
||||
it "should allow filtering by a specified milestone" do
|
||||
visit project_issues_path(project, milestone_id: @issue.milestone.id)
|
||||
|
||||
page.should have_content 'foobar'
|
||||
page.should_not have_content 'barbaz'
|
||||
page.should_not have_content 'gitlab'
|
||||
end
|
||||
|
||||
it "should allow filtering by issues with no specified assignee" do
|
||||
visit project_issues_path(project, assignee_id: '0')
|
||||
|
||||
page.should have_content 'foobar'
|
||||
page.should_not have_content 'barbaz'
|
||||
page.should_not have_content 'gitlab'
|
||||
end
|
||||
|
||||
it "should allow filtering by a specified assignee" do
|
||||
visit project_issues_path(project, assignee_id: @user.id)
|
||||
|
||||
page.should_not have_content 'foobar'
|
||||
page.should have_content 'barbaz'
|
||||
page.should have_content 'gitlab'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue