small medium large xlarge

Me_pragsmall
28 Jun 2012, 11:44
Andrew Gellene (33 posts)

PDF Book says: (version 2.2) says

test “should create order” do assert_difference(‘Order.count’) do post :create, order: @order.attributes

But because of the mass assignment issue it does not work. Can someone please point me in the direct of testing this without using mass assignment. I have tried

post :create, order: @order.name

but my this fails as name is not recognized… appreciate the help

Andrew

You must be logged in to comment