mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Start SNS tests.
This commit is contained in:
parent
542cffe5b0
commit
9c78523e5e
2 changed files with 37 additions and 0 deletions
9
tests/aws/requests/sns/helper.rb
Normal file
9
tests/aws/requests/sns/helper.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class AWS
|
||||
module SNS
|
||||
module Formats
|
||||
BASIC = {
|
||||
'RequestId' => String
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
28
tests/aws/requests/sns/topic_lifecycle_tests.rb
Normal file
28
tests/aws/requests/sns/topic_lifecycle_tests.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
Shindo.tests('AWS::SES | topic lifecycle tests', ['aws', 'sns']) do
|
||||
|
||||
tests('success') do
|
||||
|
||||
tests("#create_topic('TopicArn' => 'example-topic')").formats(AWS::SNS::Formats::BASIC.merge('TopicArn' => String)) do
|
||||
pending if Fog.mocking?
|
||||
body = AWS[:sns].create_topic('Name' => 'example-topic').body
|
||||
@topic_arn = body["TopicArn"]
|
||||
body
|
||||
end
|
||||
|
||||
tests("#list_topics").formats(AWS::SNS::Formats::BASIC.merge('Topics' => [String])) do
|
||||
pending if Fog.mocking?
|
||||
AWS[:sns].list_topics.body
|
||||
end
|
||||
|
||||
tests("#delete_topic('TopicArn' => 'example-topic')").formats(AWS::SNS::Formats::BASIC) do
|
||||
pending if Fog.mocking?
|
||||
AWS[:sns].delete_topic('TopicArn' => @topic_arn).body
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
tests('failure') do
|
||||
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue