title: Michael Hartl's Rails 5 tutorial chapter 10, listing 10.56, test if the admin attribute is forbidden
body: <p>I was trying to pass the exercise in <a href="https://www.railstutorial.org/book/updating_and_deleting_users//" rel="nofollow">listing 10.56</a>  and test if the admin attribute is forbidden.
  I added admin parameter in </p>
  
  <p><strong>app/controllers/users_controller.rb</strong></p>
  
  <pre><code>def user_params
        params.require(:user).permit(:name, :email, :password,
                                     :password_confirmation,
                                     :admin)
  end
  </code></pre>
  
  <p>also, filled necessary parts in </p>
  
  <p><strong>test/controllers/users_controller_test.rb</strong></p>
  
  <pre><code>test "should not allow the admin attribute to be edited via the web" do
        log_in_as(@other_user)
        assert_not @other_user.admin?
        patch :update, id: @other_user, user: { password: "",
                                                password_confirmation: "",
                                                admin: true }
        assert_not @other_user.reload.admin?
   end
  </code></pre>
  
  <p>Still, I am getting unknown error after test:</p>
  
  <pre><code>ERROR["test_should_not_allow_the_admin_attribute_to_be_edited_via_the_web", UsersControllerTest, 3.2600422599352896]
   test_should_not_allow_the_admin_attribute_to_be_edited_via_the_web#UsersControllerTest (3.26s)
  URI::InvalidURIError:         URI::InvalidURIError: bad URI(is not URI?): http://www.example.com:80update
              test/controllers/users_controller_test.rb:37:in `block in &lt;class:UsersControllerTest&gt;'
  </code></pre>
  
  <p>Anyone here was dealing with the same problem?</p>