Sha256: 176ae3ae979e996b1961d7f0fafc4392d58c6d377ac378f8c841c057e0a9558e
Contents?: true
Size: 994 Bytes
Versions: 7
Compression:
Stored size: 994 Bytes
Contents
gem 'minitest' require 'minitest/autorun' require 'bib/opsworks/google' class GoogleTest < Minitest::Test def test_publish_deployment_user google = Bib::Opsworks::Google.new deploy_data = { 'deploying_user' => 'arn:aws:iam::123456:user/gemtest', 'scm' => { 'revision' => 'rev1' } } app_name = 'unittest' result = google.prepare_publishing_data(app_name, deploy_data) expected = { 'deployment[app_name]' => 'unittest', 'deployment[user]' => 'gemtest', 'deployment[revision]' => 'rev1' } assert_equal(expected, result) end def test_publish_deployment_nouser google = Bib::Opsworks::Google.new deploy_data = { 'scm' => { 'revision' => 'rev1' } } app_name = 'unittest' result = google.prepare_publishing_data(app_name, deploy_data) expected = { 'deployment[app_name]' => 'unittest', 'deployment[user]' => 'opsworks', 'deployment[revision]' => 'rev1' } assert_equal(expected, result) end end
Version data entries
7 entries across 7 versions & 1 rubygems