#3 楼@blacktulip
再请教下这个问题,
Download rails32/depot_g/test/functional/line_items_controller_test.rb
test "should create line_item" do
assert_difference('LineItem.count') do
➤ post :create, product_id: products(:ruby).id
end
➤ assert_redirected_to cart_path(assigns(:line_item).cart)
end