Sha256: fb3148b815fe6a661cf749bfebdd3ee7bce58b630e306d8c90c87be9c590ba57

Contents?: true

Size: 814 Bytes

Versions: 4

Compression:

Stored size: 814 Bytes

Contents

require 'test_plugin_helper'

class ForemanBootdisk::Api::V2::SubnetDisksControllerTest < ActionController::TestCase
  include ForemanBootdiskTestHelper
  setup :setup_bootdisk

  describe "#subnet_host" do
    setup :setup_referer
    setup :setup_org_loc
    setup :setup_subnet
    setup :setup_host

    test "should generate subnet generic host image" do
      ForemanBootdisk::ISOGenerator.expects(:generate).with(has_entry(:ipxe => regexp_matches(/disk generic host template/))).yields("temp ISO")
      ForemanBootdisk::Renderer.any_instance.stubs(:bootdisk_chain_url).yields("http://smart-proxy.lan")
      File.expects(:read).with("temp ISO").returns("ISO image")
      get :subnet, {:id => @host.subnet.id}
      assert_response :success
      assert_equal "ISO image", @response.body
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_bootdisk-10.0.2 test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
foreman_bootdisk-10.0.1 test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
foreman_bootdisk-10.0.0 test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
foreman_bootdisk-9.0.0 test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb