require 'test_helper' class UsersControllerTest < ActionDispatch::IntegrationTest setup do @user = users(:one) end test "should get edit" do get edit_user_url(@user) assert_response :success end test "should update user" do patch user_url(@user), params: { user: { username: @user.username } } assert_redirected_to user_url(@user) end end