Allow filtering by issues with no assigned milestone

Closes #1222
This commit is contained in:
Robert Speicher 2012-08-13 01:38:00 -04:00
parent 28d903858e
commit b1ea0b3c01
4 changed files with 44 additions and 2 deletions

View file

@ -89,4 +89,36 @@ 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.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
end
end