Displaying 2 results from an estimated 2 matches for "lineitemscontrollertest".
2012 Jan 18
3
Cannot redirect to nil!
I need some help please..
when I created web application about books market, i create a cart and
using test the message error appear like this on rake test:functionals
LineItemsControllerTest
> test_should_create_line_item
> ERROR
> Cannot redirect to nil!
and also appear on web side, thats error told that "Cannot redirect to nil!"
Then i was checking the code, and i think that''s nothing need to do, all
it''s normal.
somebody may have...
2013 Sep 23
1
redirect on browser success, but redirect on functional test is error
...quot; do
@cart = @line_item.cart
assert_difference(''LineItem.count'', -1) do
delete :destroy, id: @line_item
end
assert_redirected_to @cart
end
----------------------------------------------
rake test:functionals
1) Error:
test_should_destroy_line_item(LineItemsControllerTest):
ActionController::ActionControllerError: Cannot redirect to nil!
------------------------------------------------
@cart in line_items_controller.rb may be nil, when executing functional
test.
Accessing by browser "line_items/20/ post:delete", correctly redirected
show cart that cont...