tests/rackspace/identity_tests.rb in fog-1.15.0 vs tests/rackspace/identity_tests.rb in fog-1.16.0
- old
+ new
@@ -14,12 +14,17 @@
end
tests('reauthentication') do
pending if Fog.mocking?
- @service = Fog::Rackspace::Identity.new :rackspace_region => :ord
- returns(true, "auth token populated") { !@service.auth_token.nil? }
- @service.instance_variable_set("@auth_token", "bad-token")
- returns(true) { [200, 203].include? @service.list_tenants.status }
+ tests('should reauth with valid credentials') do
+ @service = Fog::Rackspace::Identity.new :rackspace_region => :ord
+ returns(true, "auth token populated") { !@service.auth_token.nil? }
+ @service.instance_variable_set("@auth_token", "bad-token")
+ returns(true) { [200, 203].include? @service.list_tenants.status }
+ end
+ tests('should terminate with incorrect credentials') do
+ raises(Excon::Errors::Unauthorized) { Fog::Rackspace::Identity.new :rackspace_api_key => 'bad_key' }
+ end
end
end
\ No newline at end of file