From bf5f673731ce850d761bb34fee2644aa39867ff1 Mon Sep 17 00:00:00 2001 From: Kayla Firestack Date: Wed, 13 Nov 2024 21:14:29 -0500 Subject: [PATCH] refactor:test(ex/skate_web/detour_controller): use `:user` factory (#2896) --- test/skate_web/controllers/detours_controller_test.exs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/skate_web/controllers/detours_controller_test.exs b/test/skate_web/controllers/detours_controller_test.exs index cd5ad1a86..ed9ee86e5 100644 --- a/test/skate_web/controllers/detours_controller_test.exs +++ b/test/skate_web/controllers/detours_controller_test.exs @@ -275,9 +275,7 @@ defmodule SkateWeb.DetoursControllerTest do test "will not return detours from other users", %{conn: conn} do current_user_id = populate_db_and_get_user(conn) - Skate.Settings.User.upsert("other_user", "other_user@gmail.com") - - other_user = Skate.Settings.User.get_by_email("other_user@gmail.com") + other_user = build(:user) # Manually insert a detour by another user Detours.upsert_from_snapshot(other_user.id, %{