Project

General

Profile

« Previous | Next » 

Revision a23741a2

Added by Ohad Levy over 10 years ago

refs #3928 - use updated test fixture

View differences:

test/functional/api/v2/os_default_templates_controller_test.rb
class Api::V2::OsDefaultTemplatesControllerTest < ActionController::TestCase
test 'should get os_default_templates for os' do
get :index, {:operatingsystem_id => operatingsystems(:centos5_3).to_param }
get :index, {:operatingsystem_id => operatingsystems(:redhat).to_param }
assert_response :success
assert_not_nil assigns(:os_default_templates)
results = ActiveSupport::JSON.decode(@response.body)
......
OsDefaultTemplate.delete_all
assert_difference('OsDefaultTemplate.count') do
post :create, { :operatingsystem_id => operatingsystems(:redhat).to_param, :os_default_template => {:config_template_id => config_templates(:mystring).id,
:template_kind_id => template_kinds(:gpxe).id}
:template_kind_id => template_kinds(:ipxe).id}
}
end
assert_response :success

Also available in: Unified diff