Project

General

Profile

« Previous | Next » 

Revision c3db9892

Added by Lukas Zapletal about 8 years ago

Fixes #6539 - missing templates error is now descriptive

View differences:

test/unit/host_test.rb
test "custom_disk_partition_with_erb" do
h = FactoryGirl.create(:host)
h.disk = "<%= 1 + 1 %>"
h.disk = "<%= @template_name %>"
assert h.save
assert h.disk.present?
assert_equal "2", h.diskLayout
assert_equal "Custom disk layout", h.diskLayout
end
test "custom_disk_partition_with_ptable" do
h = FactoryGirl.create(:host, :managed)
h.disk = ''
h.ptable.stubs(:name).returns("some_name")
h.ptable.stubs(:layout).returns("<%= @template_name %>")
assert h.save
assert_equal "some_name", h.diskLayout
end
test "models are updated when host.model has no value" do

Also available in: Unified diff