Sha256: 7e748088305cf251a3729c7056819699b3c66d4e06a03b75324bd4e6ae3ad4ca

Contents?: true

Size: 1.81 KB

Versions: 162

Compression:

Stored size: 1.81 KB

Contents

Shindo.tests("Fog::AWS[:beanstalk] | version", ['aws', 'beanstalk']) do

  pending if Fog.mocking?

  @beanstalk = Fog::AWS[:beanstalk]

  @application_name = uniq_id('fog-test-app')
  @version_name = uniq_id('fog-test-version')

  @version_description = 'A nice description'

  @application = @beanstalk.applications.create({:name => @application_name})

  @version_opts = {
      :application_name => @application_name,
      :label => @version_name,
      :description => @version_description
  }

  model_tests(@beanstalk.versions, @version_opts, false) do

    test("attributes") do
      @instance.label == @version_name &&
          @instance.description == @version_description &&
          @instance.application_name == @application_name
    end

    test("#events") do
      # There should be some events now.
      @instance.events.length > 0
    end

    test("#update description") do
      new_description = "A completely new description."
      @instance.description = new_description
      @instance.update

      passed = false
      if @instance.description == new_description
        # reload version from AWS to verify save is committed to server, not just on local object
        if @beanstalk.versions.get(@application_name, @version_name).description == new_description
          passed = true
        end
      end
      passed
    end

    test("#update description empty") do
      @instance.description = '' # Set to empty to nil out
      @instance.update

      passed = false
      if @instance.description == nil
        # reload version from AWS to verify save is committed to server, not just on local object
        if @beanstalk.versions.get(@application_name, @version_name).description == nil
          passed = true
        end
      end
      passed
    end

  end

  # delete application
  @application.destroy
end

Version data entries

162 entries across 160 versions & 18 rubygems

Version Path
fog-aws-3.12.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.11.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.10.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.9.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.8.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.7.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.7 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.6 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.5 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.4 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.3 tests/models/beanstalk/version_tests.rb
fog-aws-3.6.2 tests/models/beanstalk/version_tests.rb
fog-aws-3.5.2 tests/models/beanstalk/version_tests.rb
fog-aws-3.5.1 tests/models/beanstalk/version_tests.rb
fog-aws-3.5.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.4.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.3.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.2.0 tests/models/beanstalk/version_tests.rb
fog-aws-3.1.0 tests/models/beanstalk/version_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/models/beanstalk/version_tests.rb