From: Michal Fojtik <[email protected]>
Signed-off-by: Michal fojtik <[email protected]>
---
tests/mock/instances.feature | 1 +
tests/mock/step_definitions/api_steps.rb | 4 +++-
tests/mock/step_definitions/instances_steps.rb | 5 +++--
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/mock/instances.feature b/tests/mock/instances.feature
index 460e7a7..ae49e79 100644
--- a/tests/mock/instances.feature
+++ b/tests/mock/instances.feature
@@ -48,6 +48,7 @@ Feature: Managing instances
| authentication |
| public_addresses |
| private_addresses |
+ | storage_volumes |
Scenario: Following image href in instance
Given URI /api/instances exists
diff --git a/tests/mock/step_definitions/api_steps.rb
b/tests/mock/step_definitions/api_steps.rb
index 1169a97..27d1e8f 100644
--- a/tests/mock/step_definitions/api_steps.rb
+++ b/tests/mock/step_definitions/api_steps.rb
@@ -1,5 +1,7 @@
+World(Rack::Test::Methods)
+
Given /^URI ([\w\/\-_]+) exists$/ do |uri|
- get uri, {}
+ get uri
last_response.status.should_not == 404
last_response.status.should_not == 500
@uri = uri
diff --git a/tests/mock/step_definitions/instances_steps.rb
b/tests/mock/step_definitions/instances_steps.rb
index fd86903..3016bd8 100644
--- a/tests/mock/step_definitions/instances_steps.rb
+++ b/tests/mock/step_definitions/instances_steps.rb
@@ -36,10 +36,11 @@ When /^client follow link in actions$/ do
l = @instance.xpath('actions/link[@rel="'+@action+'"]').first
if @action.eql?('destroy')
- delete l[:href], { :id => @instance.xpath('@id').first.text }
+ delete l[:href]
else
- post l[:href], { :id => @instance.xpath('@id').first.text }
+ post l[:href]
end
+ puts last_response.body if last_response.status == 500
last_response.status.should_not == 500
end
--
1.7.4.4