test: fix tests using verified routes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-01 12:06:18 +01:00
parent 6000c41364
commit 5fcf3d5267
11 changed files with 37 additions and 48 deletions

View File

@@ -84,13 +84,15 @@ defimpl Mobilizon.Service.Metadata, for: Mobilizon.Actors.Actor do
rel: "alternate",
type: "application/atom+xml",
title: gettext("%{name}'s feed", name: actor_display_name_escaped(group)) |> HTML.raw(),
href: url(~p"/@#{Actor.preferred_username_and_domain(group)}/feed/atom")
href:
~p"/@#{Actor.preferred_username_and_domain(group)}/feed/atom" |> url() |> URI.decode()
),
Tag.tag(:link,
rel: "alternate",
type: "text/calendar",
title: gettext("%{name}'s feed", name: actor_display_name_escaped(group)) |> HTML.raw(),
href: url(~p"/@#{Actor.preferred_username_and_domain(group)}/feed/ics")
href:
~p"/@#{Actor.preferred_username_and_domain(group)}/feed/ics" |> url() |> URI.decode()
),
Tag.tag(:link,
rel: "alternate",

View File

@@ -111,9 +111,7 @@ defmodule Mobilizon.Web.ApplicationController do
is_binary(state) and is_binary(scope) do
redirect(conn,
to:
url(
~p"/oauth/authorize?#{[client_id: client_id, redirect_uri: redirect_uri, scope: scope, state: state]}"
)
~p"/oauth/autorize_approve?#{[client_id: client_id, redirect_uri: redirect_uri, scope: scope, state: state]}"
)
else
if is_binary(redirect_uri) and valid_uri?(redirect_uri) do