Project

General

Profile

« Previous | Next » 

Revision 0fa5d146

Added by Dominic Cleal over 10 years ago

fixes #3752 - move data population from migrations into seed script

View differences:

test/functional/api/v2/config_templates_controller_test.rb
test "should create valid" do
ConfigTemplate.any_instance.stubs(:valid?).returns(true)
valid_attrs = { :template => "This is a test template", :template_kind_id => template_kinds(:gpxe).id, :name => "RandomName" }
valid_attrs = { :template => "This is a test template", :template_kind_id => template_kinds(:ipxe).id, :name => "RandomName" }
post :create, { :config_template => valid_attrs }
template = ActiveSupport::JSON.decode(@response.body)
assert template["name"] == "RandomName"

Also available in: Unified diff