这是我的测试
def test_create
get :new
assert_template "admin/supplier/new"
assert_difference 'Supplier.count' do
post :create, :supplier => {:name => 'Juan', :province => 'provincia'}
assert_response :redirect
assert_redirected_to :action => 'index'
end
assert_equal 'Supplier Juan was succesfully created.', flash[:notice]
end
当我执行它时,这是它显示的错误
test_create(Admin::SupplierControllerTest) [supplier_controller_test.rb:25]:
expecting <"admin/supplier/new"> but rendering with <"">
assert_template“admin / supplier / new”失败了什么?