Sha256: 46eabc95fa83d12abeab233b195c839bfca2e3bf11374417b7d47476964cfbae

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 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([])
      FactoryGirl.create(:docker_cr)
      visit containers_path
      assert page.has_link? 'New container'
      refute_equal current_path, new_compute_resource_path
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_docker-3.0.0 test/integration/container_test.rb
foreman_docker-2.1.1 test/integration/container_test.rb
foreman_docker-2.1.0 test/integration/container_test.rb