Skip to content

Commit

Permalink
Modernized the smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcPerezPro committed Jul 14, 2021
1 parent 093529c commit 402209a
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions spec/aws_sns_action_spec.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
describe Fastlane::Actions::AwsSnsAction do
describe '#run' do
it 'doesn\'t smoke when you run it' do
expect(Fastlane::UI).to receive(:important).with('Created String')
describe Fastlane do
describe Fastlane::FastFile do
describe 'aws_sns' do
it 'returns the FCM Platform ARN' do
expect(Fastlane::UI).to receive(:important).with('Created String')
result = Fastlane::FastFile.new.parse("
lane :test do
aws_sns_client = Aws::SNS::Client.new(stub_responses: true)
aws_sns_client = Aws::SNS::Client.new(stub_responses: true)
arn = aws_sns({
aws_sns_client: aws_sns_client,
platform: 'FCM',
platform_name: 'FCM_SNS_PLATFORM_APP',
platform_fcm_server_key: 'PLACEHOLDER_FCM_KEY',
attributes_override: {}
})
end
").runner.execute(:test)

arn = Fastlane::Actions::AwsSnsAction.run({
aws_sns_client: aws_sns_client,
platform: 'FCM',
platform_name: 'FCM_SNS_PLATFORM_APP',
platform_fcm_server_key: 'PLACEHOLDER_FCM_KEY',
attributes_override: {}
})
expect(arn).to eq('String')
expect(result).to eq("String")
end
end
end
end

0 comments on commit 402209a

Please sign in to comment.