title: Test is returning param missing or value empty
body: <p>I am working on a small application in RoR 4 and am running into a hiccup. Here is the code I am working with:</p>
  
  <pre><code>def update
    @status = current_user.statuses.find(params[:id])
  
    if params[:status] &amp;&amp; params[:status].has_key?(:user_id)
      params[:status].delete(:user_id)
    end
  
    respond_to do |format|
      if @status.update(status_params)
        format.html { redirect_to @status, notice: 'Status was successfully updated.' }
        format.json { render :show, status: :ok, location: @status } #Original
      else
        format.html { render :edit }
        format.json { render json: @status.errors, status: :unprocessable_entity }
      end
    end
  end
  
  private
    # Never trust parameters from the scary internet, only allow the white list through.
    def status_params
      params.require(:status).permit(:user_id, :content)
    end
  end
  </code></pre>
  
  <p>And here is the test I am running:</p>
  
  <pre><code>test "should not update status if nothing has changed" do
    sign_in users(:sean)
    patch :update, id: @status
    assert_redirected_to status_path(assigns(:status))
    assert_equal assigns(:status).user_id, users(:sean).id
  end
  </code></pre>
  
  <p>When I run the test, this is the failure I am getting:</p>
  
  <pre><code>1) Error:
     StatusesControllerTest#test_should_not_update_status_if_nothing_has_changed:
     ActionController::ParameterMissing: param is missing or the value is empty: status
     app/controllers/statuses_controller.rb:80:in `status_params'
     app/controllers/statuses_controller.rb:51:in `block in update'
     app/controllers/statuses_controller.rb:50:in `update'
     test/controllers/statuses_controller_test.rb:83:in `block in &lt;class:StatusesControllerTest&gt;'
  </code></pre>
  
  <p>When I issue a puts statement, the output shows:
      {"status"=>{"content"=>"MyText"}</p>
  
  <p>So I assume the parameter exists and is populated. Any help on this would be greatly appreciated, as I am at my wits end. Here is a link to my github where the code is hosted: </p>
  
  <p><a href="http://www.github.com/sean-perryman/treebook" rel="nofollow">http://www.github.com/sean-perryman/treebook</a></p>