You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/07/30 16:29:17 UTC
[22/50] [abbrv] git commit: Core: Fixed failing keys_collection test
Core: Fixed failing keys_collection test
Attempt to create a new key when the key with
given name already exists will raise exception
instead of returning 403 in test.
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/eeb4a9f3
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/eeb4a9f3
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/eeb4a9f3
Branch: refs/heads/master
Commit: eeb4a9f30363d1eaa11d1d42adbb020ee136d74c
Parents: 8a8257b
Author: Michal Fojtik <mf...@redhat.com>
Authored: Fri Jul 27 13:54:30 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Fri Jul 27 13:55:43 2012 +0200
----------------------------------------------------------------------
.../deltacloud/collections/keys_collection_test.rb | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/eeb4a9f3/server/tests/deltacloud/collections/keys_collection_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/deltacloud/collections/keys_collection_test.rb b/server/tests/deltacloud/collections/keys_collection_test.rb
index 26b58c4..0ada149 100644
--- a/server/tests/deltacloud/collections/keys_collection_test.rb
+++ b/server/tests/deltacloud/collections/keys_collection_test.rb
@@ -46,8 +46,9 @@ describe Deltacloud::Collections::Keys do
xml.root.name.must_equal 'key'
xml.root[:id].must_equal 'unit-test1'
(xml/'key/pem').wont_be_empty
- post root_url + '/keys', { :name => 'unit-test1' }
- status.must_equal 403
+ Proc.new {
+ post root_url + '/keys', { :name => 'unit-test1' }
+ }.must_raise Deltacloud::ExceptionHandler::ProviderError, 'keyExist'
delete root_url + '/keys/unit-test1'
status.must_equal 204
end