Sha256: a2c6e264656f62d44a150adc8a4d8e324506c696f34e55caf44720923564a98b

Contents?: true

Size: 856 Bytes

Versions: 7

Compression:

Stored size: 856 Bytes

Contents

require 'test_helper'

class BeanstalkTest < Test::Unit::TestCase

  class StubbedCnameResponder
    def initialize(stubbed_response)
      @stubbed_response = stubbed_response
    end

    def describe_environments(options)
      {:environments => [@stubbed_response.merge(:status => "online")]}
    end
  end

  def test_cname_prefix_will_parse_both_legacy_and_regionalized_domains
    legacy_domain = "mingle-saas.elasticbeanstalk.com"
    regionalized_domain = "mingle-saas.us-west-1.elasticbeanstalk.com"

    assert_equal "mingle-saas", EbDeployer::AWSDriver::Beanstalk.new(StubbedCnameResponder.new(:cname => legacy_domain)).environment_cname_prefix("mingle", "saas")
    assert_equal "mingle-saas", EbDeployer::AWSDriver::Beanstalk.new(StubbedCnameResponder.new(:cname => regionalized_domain)).environment_cname_prefix("mingle", "saas")
  end

end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
man_eb_deployer-0.8.0 test/beanstalk_test.rb
eb_deployer_updated-0.8.1 test/beanstalk_test.rb
eb_deployer_updated-0.8.0 test/beanstalk_test.rb
eb_deployer-0.7.0 test/beanstalk_test.rb
eb_deployer-0.6.6 test/beanstalk_test.rb
eb_deployer-0.6.5 test/beanstalk_test.rb
eb_deployer-0.6.4 test/beanstalk_test.rb