From: Martyn Taylor <[email protected]>

---
 src/features/provider.feature                   |   22 ++++++++++++++++++++++
 src/features/step_definitions/provider_steps.rb |    2 +-
 2 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/features/provider.feature b/src/features/provider.feature
index 9e6f398..08704dd 100644
--- a/src/features/provider.feature
+++ b/src/features/provider.feature
@@ -73,3 +73,25 @@ Feature: Manage Providers
     And there should not be any hardware profiles
     And there should not be a cloud account
     And there should not be a realm
+
+  Scenario: Search for hardware profiles
+    Given there are these providers:
+    | name          | url                         |
+    | Test          | http://testprovider.com/api |
+    | Mock          | http://mockprovider.com/api |
+    | Other         | http://sometesturl.com/api  |
+    And I am on the admin providers page
+    Then I should see the following:
+    | Test  | http://testprovider.com/api |
+    | Mock  | http://mockprovider.com/ap  |
+    | Other | http://sometesturl.com/api  |
+    When I fill in "q" with "test"
+    And I press "Search"
+    Then I should see "Test"
+    And I should see "Other"
+    And I should not see "Mock"
+    When I fill in "q" with "Mock"
+    And I press "Search"
+    Then I should see "Mock"
+    And I should not see "Test"
+    And I should not see "Other"
\ No newline at end of file
diff --git a/src/features/step_definitions/provider_steps.rb 
b/src/features/step_definitions/provider_steps.rb
index 2673ae8..bc56276 100644
--- a/src/features/step_definitions/provider_steps.rb
+++ b/src/features/step_definitions/provider_steps.rb
@@ -32,7 +32,7 @@ end
 
 Given /^there are these providers:$/ do |table|
   table.hashes.each do |hash|
-    Factory(:mock_provider, :name => hash['name'])
+    hash['url'].nil? ? Factory(:mock_provider, :name => hash['name']) : 
Factory(:mock_provider, :name => hash['name'], :url => hash['url'])
   end
 end
 
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to