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

@@ -1,7 +1,7 @@
defmodule Mobilizon.Web.ApplicationControllerTest do
use Mobilizon.Web.ConnCase
alias Mobilizon.Service.Auth.Applications
alias Mobilizon.Web.Router.Helpers, as: Routes
use Mobilizon.Web, :verified_routes
import Mobilizon.Factory
describe "create application" do
@@ -74,7 +74,9 @@ defmodule Mobilizon.Web.ApplicationControllerTest do
conn =
get(
conn,
"/oauth/authorize?client_id=hello&redirect_uri=#{URI.encode("https://somewhere.org/callback")}"
url(
~p"/oauth/authorize?client_id=hello&redirect_uri=#{URI.encode("https://somewhere.org/callback")}"
)
)
assert redirected_to(conn) =~
@@ -85,7 +87,9 @@ defmodule Mobilizon.Web.ApplicationControllerTest do
conn =
get(
conn,
"/oauth/authorize?client_id=hello&redirect_uri=#{URI.encode("https://somewhere.org/callback&state=something&scope=everything")}"
url(
~p"/oauth/authorize?client_id=hello&scope=everything&state=something&redirect_uri=#{URI.encode("https://somewhere.org/callback")}"
)
)
assert redirected_to(conn) =~ "/oauth/autorize_approve"