Sha256: 9063f2db9a1aa3f4ef2d02d7b3797a4c5afcce68dd00295c36334a7fe3efd0c1

Contents?: true

Size: 825 Bytes

Versions: 51

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

51 entries across 51 versions & 1 rubygems

Version Path
foreman_discovery-25.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-24.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-23.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-24.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-24.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-23.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-23.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-22.0.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.5 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-22.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.3 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.2 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-19.0.5 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-19.0.4 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-19.0.3 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-21.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
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