Sha256: 6835cb4001391516b7a34ce36485ff3297e39678aadf910e9b4a73b80e4af1a0

Contents?: true

Size: 633 Bytes

Versions: 4

Compression:

Stored size: 633 Bytes

Contents

require 'integration_test_helper'

class ContainerIntegrationTest < ActionDispatch::IntegrationTest
  test 'redirects to a new compute resource if none is available' do
    visit containers_path
    assert_equal current_path, new_compute_resource_path
  end

  context 'available compute resource' do
    test 'shows containers list if compute resource is available' do
      Fog.mock!
      ComputeResource.any_instance.stubs(:vms).returns([])
      FactoryBot.create(:docker_cr)
      visit containers_path
      assert page.has_link? 'Create container'
      refute_equal current_path, new_compute_resource_path
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_docker-5.0.0 test/integration/container_test.rb
foreman_docker-4.1.1 test/integration/container_test.rb
foreman_docker-4.1.0 test/integration/container_test.rb
foreman_docker-4.0.0 test/integration/container_test.rb