Project

General

Profile

« Previous | Next » 

Revision eef532aa

Added by Lukas Zapletal about 8 years ago

Fixes #14931 - TFTP class instantiating fixed

View differences:

test/tftp/tftp_api_test.rb
@args = { :pxeconfig => "foo" }
end
def test_instantiate_syslinux
obj = app.helpers.instantiate "syslinux", "AA:BB:CC:DD:EE:FF"
assert_equal "Proxy::TFTP::Syslinux", obj.class.name
end
def test_instantiate_nonexisting
subject = app
subject.helpers.expects(:log_halt).with(403, "Unrecognized pxeboot config type: Server").at_least(1)
subject.helpers.instantiate "Server", "AA:BB:CC:DD:EE:FF"
end
def test_api_can_fetch_boot_file
Proxy::Util::CommandTask.stubs(:new).returns(true)
FileUtils.stubs(:mkdir_p).returns(true)

Also available in: Unified diff