Sha256: 14971c9d7dd70e755f34fa1ff3badf512a220cbcd2a975f1bedc6adc14928b4a

Contents?: true

Size: 789 Bytes

Versions: 4

Compression:

Stored size: 789 Bytes

Contents

require 'test_plugin_helper'
require 'test_helper_discovery'

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
          architecture = FactoryGirl.create(:architecture)
          discovered_host_params = {
            'discovered_host' => { 'architecture_id' => architecture.id }
          }

          @request.stubs(:path).
            returns(architecture_selected_discovered_hosts_path)

          post :architecture_selected, discovered_host_params, set_session_user
          assert assigns('architecture'), architecture
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_discovery-9.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-8.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-8.0.0 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
foreman_discovery-7.0.1 test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb