Issue Labels: Edit, show, index + filter

This commit is contained in:
Dmitriy Zaporozhets 2012-06-27 21:20:35 +03:00
parent 4c1f435ab7
commit 1b1e77c728
12 changed files with 93 additions and 29 deletions

View file

@ -0,0 +1,22 @@
Given /^project "(.*?)" have "(.*?)" open issue$/ do |arg1, arg2|
project = Project.find_by_name(arg1)
Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first)
end
Given /^project "(.*?)" have "(.*?)" closed issue$/ do |arg1, arg2|
project = Project.find_by_name(arg1)
Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first, :closed => true)
end
Given /^I visit project "(.*?)" issues page$/ do |arg1|
visit project_issues_path(Project.find_by_name(arg1))
end
Given /^I should see "(.*?)" open issue$/ do |arg1|
page.should have_content arg1
end
Given /^I should not see "(.*?)" closed issue$/ do |arg1|
page.should_not have_content arg1
end