test "should redirect update when not logged in" do patch user_path(@user) assert_not flash.empty? assert_redirected_to login_url end