Ruby on Rails > test:integration Expected response to be a <:redirect>, but was <404>


I'm trying to write some tests and I get a failure error on one test,
which I am not sure why or where is my mistake.

In my test/integration/product_test.rb I have:

require 'test_helper'

class ProductTest < ActionController::IntegrationTest
  fixtures :all

  test "product_administartion_by_admin" do
    category = Category.create(:name => 'Parts')

    quentin = new_session_as(:quentin)
    product = quentin.add_product :product => {
      :title => 'Clip',
      :category_id =>,
      :sku => 54321,
      :desctription => 'some text',
      :price => 8.71


  module ProductTestDSL
    attr_writer :name

    def add_product(parameters)
      post "/product/create", parameters
      assert_response :redirect
      assert_response :success
      assert_template "/product/show"
      return Product.find_by_title(parameters[:product][:title])

  def new_session_as(name)
    open_session do |session|
      session.extend(ProductTestDSL) = name
      yield session if block_given?