Skip to content

Commit

Permalink
refactor:test(ex/skate_web/detour_controller): use :user factory (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
firestack authored Nov 14, 2024
1 parent d41b967 commit bf5f673
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/skate_web/controllers/detours_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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, %{
Expand Down

0 comments on commit bf5f673

Please sign in to comment.