rails/rails — Issue #3339: Functional testing method get confuses action with params
Author: eskila
Created: 2011-10-15 15:32:15+00:00
State: open

I have a test method that looks like this:

test "should get show" do
#Test that we can get a specific product with URL, Fawkes mask product should return since publish = true for the fixture

get :show, {:url => products(:fawkes).url, :publish => true}

assert assert(:product), "Should assign a product for fawkes"
assert assigns(:storage_units), "Should get the storage units of fawkes product"

assert_response :success
end

When I run the test the params gets mixed up with the action request:

test_should_get_show(ProductsControllerTest):
ActionController::RoutingError: No route matches {:url=>"fawkes", :publish=>true, :controller=>"products", :action=>"show"}