Ruby on Rails Friday, April 5, 2013

test work without errors. I easy ask, its correct code for this test?

test "update_shipping_date" do
order_before = orders(:one)

get "/orders/1/edit"
assert_response :success
assert_template "edit"

post_via_redirect "/orders",
order: { name: "Name",
address: "MyText",
email: "mail@gmail.com",
pay_type_id: pay_types(:one).id,
ship_date: "2013-04-04" }

assert_template 'show'
assert_equal order_before.ship_date, order.ship_date

end

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment