Sha256: 9063f2db9a1aa3f4ef2d02d7b3797a4c5afcce68dd00295c36334a7fe3efd0c1

Contents?: true

Size: 825 Bytes

Versions: 53

Compression:

Stored size: 825 Bytes

Contents

require_relative '../../../test_plugin_helper'

module ForemanDiscovery
  module Concerns
    class HostsControllerTest < ActionController::TestCase
      tests ::HostsController

      context 'hosts controller requests from discovered_hosts url' do
        test 'get "host" params from "discovered_hosts" params' do
          os = FactoryBot.create(:operatingsystem, :with_associations)
          arch_id = os.architectures.first.id
          discovered_host_params = {
            'discovered_host' => { 'architecture_id' => arch_id }
          }

          @request.stubs(:path).returns(architecture_selected_discovered_hosts_path)
          post :architecture_selected, params: discovered_host_params, session: set_session_user
          assert_match(/"#{os.id}"/, response.body)
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
foreman_discovery-19.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-20.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-20.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-19.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-19.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-18.0.5 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-18.0.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-18.0.3 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.5 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-18.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.3 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-18.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-16.3.6 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-17.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-16.3.5 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-16.1.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-16.1.3 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb