       assert_delivered_email mocked_mail
       assert String.contains?(conn.private.phoenix_flash["info"], "You will receive an email with instructions for how to confirm your email address in a few minutes.")
       assert String.contains?(conn.resp_body, Sentinel.Config.router_helper.account_path(Sentinel.Config.endpoint, :edit))
+      assert Guardian.Plug.current_resource(conn).id == user.id
     end
   end
 

    user = TestRepo.get_by!(User, email: params.user.email)

    assert user.role == "foo"
  end
end

    assert updated_user.confirmed_at != nil
    assert String.contains?(conn.private.phoenix_flash["info"], "Successfully confirmed your account")
    assert String.contains?(conn.resp_body, "You are being <a href=\"/\">redirected</a>")
    assert Guardian.Plug.current_resource(conn).id == updated_user.id
  end

  test "confirm a user's new email", %{conn: conn, params: %{user: user}} do
