diff --git a/tests/aws/requests/sns/helper.rb b/tests/aws/requests/sns/helper.rb new file mode 100644 index 000000000..7cc87d183 --- /dev/null +++ b/tests/aws/requests/sns/helper.rb @@ -0,0 +1,9 @@ +class AWS + module SNS + module Formats + BASIC = { + 'RequestId' => String + } + end + end +end diff --git a/tests/aws/requests/sns/topic_lifecycle_tests.rb b/tests/aws/requests/sns/topic_lifecycle_tests.rb new file mode 100644 index 000000000..877d5e43a --- /dev/null +++ b/tests/aws/requests/sns/topic_lifecycle_tests.rb @@ -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