Revision 0fa5d146
Added by Dominic Cleal over 10 years ago
test/unit/config_template_test.rb | ||
---|---|---|
tmplt = ConfigTemplate.new
|
||
tmplt.name = "Default Kickstart"
|
||
tmplt.template = "Some kickstart goes here"
|
||
tmplt.template_kind = template_kinds(:gpxe)
|
||
tmplt.template_kind = template_kinds(:ipxe)
|
||
assert tmplt.valid?
|
||
end
|
||
|
||
... | ... | |
tmplt.name = "Default Kickstart"
|
||
tmplt.template = "Some kickstart goes here"
|
||
tmplt.snippet = true
|
||
tmplt.template_kind = template_kinds(:gpxe)
|
||
tmplt.template_kind = template_kinds(:ipxe)
|
||
tmplt.hostgroups << hostgroups(:common)
|
||
tmplt.environments << environments(:production)
|
||
as_admin do
|
||
... | ... | |
end
|
||
|
||
# If the template is not a snippet is should require the specific declaration
|
||
# of a type (gpxe, finish, etc.)
|
||
# of a type (ipxe, finish, etc.)
|
||
def test_should_require_a_template_kind
|
||
tmplt = ConfigTemplate.new
|
||
tmplt.name = "Some finish script"
|
Also available in: Unified diff
fixes #3752 - move data population from migrations into seed script