title: Expected response to be a <redirect>, but was <200>
body: <p>I'm trying to testing the create action in the UsersController where the user is created with a profile; then the user is redirected to the user's profile page, but i get the error <code>Expected response to be a &lt;redirect&gt;, but was &lt;200&gt;</code>.</p>
  
  <p>CREATE ACTION IN USER CONTROLLER</p>
  
  <pre><code>def create
    @user = User.new(user_params)
    if @user.save
      log_in @user
      flash[:success] = "Welcome to the Mini Olympics"
      redirect_to user_profile_path(current_user, @profile)
    else
      render 'new'
    end
  end
  </code></pre>
  
  <p>SIGNUP TEST USING VALID INFORMATION</p>
  
  <pre><code>test "valid signup information" do
    get signup_path
    assert_difference 'User.count', 1 do
      post users_path, user: @user.attributes
      @user.build_profile(name: "Micheal Example", street: "24 Martins St.", city: "Waterloo", state: "AW", zipcode: "22456")
      @user.save
      #assert_redirected_to user_profile_path(@user)
      assert_redirected_to @user.profile
    end
    assert_template 'profiles/show'
    assert is_logged_in?
  end
  </code></pre>