From 12dd7d2a9ab3066085572e0a47425a0442dd07ab Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Thu, 26 Sep 2013 19:05:55 +0300
Subject: [PATCH] Fix issues search test

---
 features/project/issues/issues.feature   |  2 ++
 features/steps/project/project_issues.rb | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index a4415736df7..5db9e01068c 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -3,6 +3,7 @@ Feature: Project Issues
     Given I sign in as a user
     And I own project "Shop"
     And project "Shop" have "Release 0.4" open issue
+    And project "Shop" have "Tweet feature" open issue
     And project "Shop" have "Release 0.3" closed issue
     And I visit project "Shop" issues page
 
@@ -40,6 +41,7 @@ Feature: Project Issues
     Given I fill in issue search with "Release"
     Then I should see "Release 0.4" in issues
     And I should not see "Release 0.3" in issues
+    And I should not see "Tweet feature" in issues
 
   @javascript
   Scenario: I search issue that not exist
diff --git a/features/steps/project/project_issues.rb b/features/steps/project/project_issues.rb
index 70e5cdf4a94..70c9b3a3f2e 100644
--- a/features/steps/project/project_issues.rb
+++ b/features/steps/project/project_issues.rb
@@ -12,6 +12,10 @@ class ProjectIssues < Spinach::FeatureSteps
     page.should_not have_content "Release 0.3"
   end
 
+  And 'I should not see "Tweet feature" in issues' do
+    page.should_not have_content "Tweet feature"
+  end
+
   Given 'I click link "Closed"' do
     click_link "Closed"
   end
@@ -123,6 +127,14 @@ class ProjectIssues < Spinach::FeatureSteps
            author: project.users.first)
   end
 
+  And 'project "Shop" have "Tweet feature" open issue' do
+    project = Project.find_by_name("Shop")
+    create(:issue,
+           title: "Tweet feature",
+           project: project,
+           author: project.users.first)
+  end
+
   And 'project "Shop" have "Release 0.3" closed issue' do
     project = Project.find_by_name("Shop")
     create(:closed_issue,
-- 
GitLab