tests/rackspace/block_storage_tests.rb in fog-maestrodev-1.14.0.20130806165225 vs tests/rackspace/block_storage_tests.rb in fog-maestrodev-1.15.0.20130829165835
- old
+ new
@@ -103,12 +103,17 @@
end
tests('reauthentication') do
pending if Fog.mocking?
- @service = Fog::Rackspace::BlockStorage.new :rackspace_region => :ord
- returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
- @service.instance_variable_set("@auth_token", "bad-token")
- returns(200) { @service.list_volumes.status }
+ tests('should reauth with valid credentials') do
+ @service = Fog::Rackspace::BlockStorage.new :rackspace_region => :ord
+ returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
+ @service.instance_variable_set("@auth_token", "bad-token")
+ returns(200) { @service.list_volumes.status }
+ end
+ tests('should terminate with incorrect credentials') do
+ raises(Excon::Errors::Unauthorized) {Fog::Rackspace::BlockStorage.new :rackspace_api_key => 'bad_key' }
+ end
end
end
\ No newline at end of file