mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|iam] Mock delete_server_certificate raises NotFound appropriately.
This commit is contained in:
parent
13090e998b
commit
0d7aa01f42
2 changed files with 6 additions and 1 deletions
|
@ -36,7 +36,9 @@ module Fog
|
|||
'RequestId' => Fog::AWS::Mock.request_id
|
||||
}
|
||||
|
||||
self.data[:server_certificates].delete(server_certificate_name)
|
||||
unless self.data[:server_certificates].delete(server_certificate_name)
|
||||
raise Fog::AWS::IAM::NotFound.new("The Server Certificate with name #{server_certificate_name} cannot be found.")
|
||||
end
|
||||
|
||||
response
|
||||
end
|
||||
|
|
|
@ -120,6 +120,9 @@ Shindo.tests('AWS::IAM | server certificate requests', ['aws']) do
|
|||
end
|
||||
|
||||
tests('#delete_server_certificate').formats(AWS::IAM::Formats::BASIC) do
|
||||
tests('raises NotFound').raises(Fog::AWS::IAM::NotFound) do
|
||||
Fog::AWS::IAM.new.delete_server_certificate("#{@key_name}fake")
|
||||
end
|
||||
Fog::AWS::IAM.new.delete_server_certificate(@key_name).body
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue