From 68c5266824ff4755adfa7f65e0697cc038360e0a Mon Sep 17 00:00:00 2001 From: abdullathedruid Date: Thu, 28 Nov 2024 01:23:08 +0000 Subject: [PATCH 1/4] Reorganize LiveView modules with consistent naming structure --- design.md | 14 ++++++++++++++ .../user_confirmation_instructions_live.ex | 0 .../live/{ => auth}/user_confirmation_live.ex | 0 .../live/{ => auth}/user_forgot_password_live.ex | 0 .../live/{ => auth}/user_login_live.ex | 0 .../live/{ => auth}/user_registration_live.ex | 0 .../live/{ => auth}/user_reset_password_live.ex | 0 .../live/{ => auth}/user_settings_live.ex | 0 .../live/{app => charts}/view_charts.ex | 0 .../live/{ => components/layout}/nav.ex | 0 .../live/components/{ => ui}/workout_component.ex | 0 .../live/{app => workouts}/edit_workout.ex | 0 .../live/{app => workouts}/view_workout.ex | 0 .../live/{app => workouts}/view_workouts.ex | 0 14 files changed, 14 insertions(+) create mode 100644 design.md rename lib/gym_live_web/live/{ => auth}/user_confirmation_instructions_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_confirmation_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_forgot_password_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_login_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_registration_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_reset_password_live.ex (100%) rename lib/gym_live_web/live/{ => auth}/user_settings_live.ex (100%) rename lib/gym_live_web/live/{app => charts}/view_charts.ex (100%) rename lib/gym_live_web/live/{ => components/layout}/nav.ex (100%) rename lib/gym_live_web/live/components/{ => ui}/workout_component.ex (100%) rename lib/gym_live_web/live/{app => workouts}/edit_workout.ex (100%) rename lib/gym_live_web/live/{app => workouts}/view_workout.ex (100%) rename lib/gym_live_web/live/{app => workouts}/view_workouts.ex (100%) diff --git a/design.md b/design.md new file mode 100644 index 0000000..e5fc7fe --- /dev/null +++ b/design.md @@ -0,0 +1,14 @@ +For a fitness-focused application, I'd suggest the following design philosophy: +Color Scheme: +Primary: A strong, energetic color like deep blue (#2563eb) - represents trust, strength, and professionalism +Secondary: A vibrant accent like coral (#f97316) - adds energy and motivation +Supporting colors: +Dark gray (#1f2937) for text +Light gray (#f3f4f6) for backgrounds +White for cards and contrast +Design Principles: +Bold and confident typography +Clean, structured layouts +High contrast for readability +Subtle shadows and elevation for depth +Smooth transitions for interactivity \ No newline at end of file diff --git a/lib/gym_live_web/live/user_confirmation_instructions_live.ex b/lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex similarity index 100% rename from lib/gym_live_web/live/user_confirmation_instructions_live.ex rename to lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex diff --git a/lib/gym_live_web/live/user_confirmation_live.ex b/lib/gym_live_web/live/auth/user_confirmation_live.ex similarity index 100% rename from lib/gym_live_web/live/user_confirmation_live.ex rename to lib/gym_live_web/live/auth/user_confirmation_live.ex diff --git a/lib/gym_live_web/live/user_forgot_password_live.ex b/lib/gym_live_web/live/auth/user_forgot_password_live.ex similarity index 100% rename from lib/gym_live_web/live/user_forgot_password_live.ex rename to lib/gym_live_web/live/auth/user_forgot_password_live.ex diff --git a/lib/gym_live_web/live/user_login_live.ex b/lib/gym_live_web/live/auth/user_login_live.ex similarity index 100% rename from lib/gym_live_web/live/user_login_live.ex rename to lib/gym_live_web/live/auth/user_login_live.ex diff --git a/lib/gym_live_web/live/user_registration_live.ex b/lib/gym_live_web/live/auth/user_registration_live.ex similarity index 100% rename from lib/gym_live_web/live/user_registration_live.ex rename to lib/gym_live_web/live/auth/user_registration_live.ex diff --git a/lib/gym_live_web/live/user_reset_password_live.ex b/lib/gym_live_web/live/auth/user_reset_password_live.ex similarity index 100% rename from lib/gym_live_web/live/user_reset_password_live.ex rename to lib/gym_live_web/live/auth/user_reset_password_live.ex diff --git a/lib/gym_live_web/live/user_settings_live.ex b/lib/gym_live_web/live/auth/user_settings_live.ex similarity index 100% rename from lib/gym_live_web/live/user_settings_live.ex rename to lib/gym_live_web/live/auth/user_settings_live.ex diff --git a/lib/gym_live_web/live/app/view_charts.ex b/lib/gym_live_web/live/charts/view_charts.ex similarity index 100% rename from lib/gym_live_web/live/app/view_charts.ex rename to lib/gym_live_web/live/charts/view_charts.ex diff --git a/lib/gym_live_web/live/nav.ex b/lib/gym_live_web/live/components/layout/nav.ex similarity index 100% rename from lib/gym_live_web/live/nav.ex rename to lib/gym_live_web/live/components/layout/nav.ex diff --git a/lib/gym_live_web/live/components/workout_component.ex b/lib/gym_live_web/live/components/ui/workout_component.ex similarity index 100% rename from lib/gym_live_web/live/components/workout_component.ex rename to lib/gym_live_web/live/components/ui/workout_component.ex diff --git a/lib/gym_live_web/live/app/edit_workout.ex b/lib/gym_live_web/live/workouts/edit_workout.ex similarity index 100% rename from lib/gym_live_web/live/app/edit_workout.ex rename to lib/gym_live_web/live/workouts/edit_workout.ex diff --git a/lib/gym_live_web/live/app/view_workout.ex b/lib/gym_live_web/live/workouts/view_workout.ex similarity index 100% rename from lib/gym_live_web/live/app/view_workout.ex rename to lib/gym_live_web/live/workouts/view_workout.ex diff --git a/lib/gym_live_web/live/app/view_workouts.ex b/lib/gym_live_web/live/workouts/view_workouts.ex similarity index 100% rename from lib/gym_live_web/live/app/view_workouts.ex rename to lib/gym_live_web/live/workouts/view_workouts.ex From 48d8e2a46fe98abf505f67eb5e61af31d4b882fb Mon Sep 17 00:00:00 2001 From: abdullathedruid Date: Thu, 28 Nov 2024 01:32:51 +0000 Subject: [PATCH 2/4] fix: add root route and fix Account module references in tests --- .../user_confirmation_instructions_live.ex | 2 +- .../live/auth/user_confirmation_live.ex | 2 +- .../live/auth/user_forgot_password_live.ex | 2 +- lib/gym_live_web/live/auth/user_login_live.ex | 2 +- .../live/auth/user_registration_live.ex | 2 +- .../live/auth/user_reset_password_live.ex | 2 +- .../live/auth/user_settings_live.ex | 2 +- lib/gym_live_web/live/charts/view_charts.ex | 2 +- .../live/components/layout/nav.ex | 5 +- .../live/workouts/edit_workout.ex | 2 +- .../live/workouts/view_workout.ex | 2 +- .../live/workouts/view_workouts.ex | 2 +- lib/gym_live_web/router.ex | 53 ++++++------------- .../live/user_confirmation_live_test.exs | 2 +- .../live/user_login_live_test.exs | 2 +- .../live/user_registration_live_test.exs | 2 +- .../live/user_settings_live_test.exs | 15 +++--- 17 files changed, 39 insertions(+), 62 deletions(-) diff --git a/lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex b/lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex index 60dcb16..fd648e6 100644 --- a/lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex +++ b/lib/gym_live_web/live/auth/user_confirmation_instructions_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserConfirmationInstructionsLive do +defmodule GymLiveWeb.Live.Auth.UserConfirmationInstructions do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/auth/user_confirmation_live.ex b/lib/gym_live_web/live/auth/user_confirmation_live.ex index b8c0d18..cfef7c9 100644 --- a/lib/gym_live_web/live/auth/user_confirmation_live.ex +++ b/lib/gym_live_web/live/auth/user_confirmation_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserConfirmationLive do +defmodule GymLiveWeb.Live.Auth.UserConfirmation do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/auth/user_forgot_password_live.ex b/lib/gym_live_web/live/auth/user_forgot_password_live.ex index 1d980ae..fbf46e8 100644 --- a/lib/gym_live_web/live/auth/user_forgot_password_live.ex +++ b/lib/gym_live_web/live/auth/user_forgot_password_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserForgotPasswordLive do +defmodule GymLiveWeb.Live.Auth.UserForgotPassword do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/auth/user_login_live.ex b/lib/gym_live_web/live/auth/user_login_live.ex index eab5b7a..40f2cf5 100644 --- a/lib/gym_live_web/live/auth/user_login_live.ex +++ b/lib/gym_live_web/live/auth/user_login_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserLoginLive do +defmodule GymLiveWeb.Live.Auth.UserLogin do use GymLiveWeb, :live_view def render(assigns) do diff --git a/lib/gym_live_web/live/auth/user_registration_live.ex b/lib/gym_live_web/live/auth/user_registration_live.ex index 6450a69..5969b91 100644 --- a/lib/gym_live_web/live/auth/user_registration_live.ex +++ b/lib/gym_live_web/live/auth/user_registration_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserRegistrationLive do +defmodule GymLiveWeb.Live.Auth.UserRegistration do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/auth/user_reset_password_live.ex b/lib/gym_live_web/live/auth/user_reset_password_live.ex index d2cea66..0afd189 100644 --- a/lib/gym_live_web/live/auth/user_reset_password_live.ex +++ b/lib/gym_live_web/live/auth/user_reset_password_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserResetPasswordLive do +defmodule GymLiveWeb.Live.Auth.UserResetPassword do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/auth/user_settings_live.ex b/lib/gym_live_web/live/auth/user_settings_live.ex index 72d83d3..77055c8 100644 --- a/lib/gym_live_web/live/auth/user_settings_live.ex +++ b/lib/gym_live_web/live/auth/user_settings_live.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserSettingsLive do +defmodule GymLiveWeb.Live.Auth.UserSettings do use GymLiveWeb, :live_view alias GymLive.Account diff --git a/lib/gym_live_web/live/charts/view_charts.ex b/lib/gym_live_web/live/charts/view_charts.ex index e8b43c1..a03ad28 100644 --- a/lib/gym_live_web/live/charts/view_charts.ex +++ b/lib/gym_live_web/live/charts/view_charts.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.ViewCharts do +defmodule GymLiveWeb.Live.Charts.ViewCharts do use GymLiveWeb, :live_app import GymLiveWeb.Charts alias GymLive.{Strength, Training} diff --git a/lib/gym_live_web/live/components/layout/nav.ex b/lib/gym_live_web/live/components/layout/nav.ex index 30344ae..6ca9a32 100644 --- a/lib/gym_live_web/live/components/layout/nav.ex +++ b/lib/gym_live_web/live/components/layout/nav.ex @@ -1,5 +1,6 @@ -defmodule GymLiveWeb.Nav do - alias GymLiveWeb.{EditWorkout, ViewCharts, ViewWorkout, ViewWorkouts} +defmodule GymLiveWeb.Live.Components.Layout.Nav do + alias GymLiveWeb.Live.Workouts.{EditWorkout, ViewWorkout, ViewWorkouts} + alias GymLiveWeb.Live.Charts.ViewCharts import Phoenix.LiveView use Phoenix.Component diff --git a/lib/gym_live_web/live/workouts/edit_workout.ex b/lib/gym_live_web/live/workouts/edit_workout.ex index 16ca87e..9cfb77a 100644 --- a/lib/gym_live_web/live/workouts/edit_workout.ex +++ b/lib/gym_live_web/live/workouts/edit_workout.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.EditWorkout do +defmodule GymLiveWeb.Live.Workouts.EditWorkout do use GymLiveWeb, :live_app alias GymLive.Training alias GymLive.Training.{Exercises, Set, Workout} diff --git a/lib/gym_live_web/live/workouts/view_workout.ex b/lib/gym_live_web/live/workouts/view_workout.ex index ab85221..daca019 100644 --- a/lib/gym_live_web/live/workouts/view_workout.ex +++ b/lib/gym_live_web/live/workouts/view_workout.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.ViewWorkout do +defmodule GymLiveWeb.Live.Workouts.ViewWorkout do use GymLiveWeb, :live_app import GymLiveWeb.StrongMan alias GymLive.Strength diff --git a/lib/gym_live_web/live/workouts/view_workouts.ex b/lib/gym_live_web/live/workouts/view_workouts.ex index 3807444..9b04b74 100644 --- a/lib/gym_live_web/live/workouts/view_workouts.ex +++ b/lib/gym_live_web/live/workouts/view_workouts.ex @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.ViewWorkouts do +defmodule GymLiveWeb.Live.Workouts.ViewWorkouts do use GymLiveWeb, :live_app alias GymLive.Training alias GymLive.Repo diff --git a/lib/gym_live_web/router.ex b/lib/gym_live_web/router.ex index d34a2bd..92c7b9f 100644 --- a/lib/gym_live_web/router.ex +++ b/lib/gym_live_web/router.ex @@ -17,40 +17,17 @@ defmodule GymLiveWeb.Router do plug :accepts, ["json"] end - # Other scopes may use custom stacks. - # scope "/api", GymLiveWeb do - # pipe_through :api - # end - - # Enable LiveDashboard and Swoosh mailbox preview in development - if Application.compile_env(:gym_live, :dev_routes) do - # If you want to use the LiveDashboard in production, you should put - # it behind authentication and allow only admins to access it. - # If your application does not have an admins-only section yet, - # you can use Plug.BasicAuth to set up some basic authentication - # as long as you are also using SSL (which you should anyway). - import Phoenix.LiveDashboard.Router - - scope "/dev" do - pipe_through :browser - - live_dashboard "/dashboard", metrics: GymLiveWeb.Telemetry - forward "/mailbox", Plug.Swoosh.MailboxPreview - end - end - - ## Authentication routes - scope "/", GymLiveWeb do pipe_through [:browser, :redirect_if_user_is_authenticated] + get "/", PageController, :home + live_session :redirect_if_user_is_authenticated, on_mount: [{GymLiveWeb.UserAuth, :redirect_if_user_is_authenticated}] do - get "/", PageController, :home - live "/users/register", UserRegistrationLive, :new - live "/users/log_in", UserLoginLive, :new - live "/users/reset_password", UserForgotPasswordLive, :new - live "/users/reset_password/:token", UserResetPasswordLive, :edit + live "/users/register", Live.Auth.UserRegistration, :new + live "/users/log_in", Live.Auth.UserLogin, :new + live "/users/reset_password", Live.Auth.UserForgotPassword, :new + live "/users/reset_password/:token", Live.Auth.UserResetPassword, :edit end post "/users/log_in", UserSessionController, :create @@ -60,15 +37,15 @@ defmodule GymLiveWeb.Router do pipe_through [:browser, :require_authenticated_user] live_session :require_authenticated_user, - on_mount: [{GymLiveWeb.UserAuth, :ensure_authenticated}, GymLiveWeb.Nav] do - live "/users/settings", UserSettingsLive, :edit - live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email + on_mount: [{GymLiveWeb.UserAuth, :ensure_authenticated}, GymLiveWeb.Live.Components.Layout.Nav] do + live "/users/settings", Live.Auth.UserSettings, :edit + live "/users/settings/confirm_email/:token", Live.Auth.UserSettings, :confirm_email - live "/workout/:id", ViewWorkout - live "/workouts", ViewWorkouts - live "/edit_workout", EditWorkout + live "/workout/:id", Live.Workouts.ViewWorkout + live "/workouts", Live.Workouts.ViewWorkouts + live "/edit_workout", Live.Workouts.EditWorkout - live "/charts", ViewCharts + live "/charts", Live.Charts.ViewCharts end end @@ -79,8 +56,8 @@ defmodule GymLiveWeb.Router do live_session :current_user, on_mount: [{GymLiveWeb.UserAuth, :mount_current_user}] do - live "/users/confirm/:token", UserConfirmationLive, :edit - live "/users/confirm", UserConfirmationInstructionsLive, :new + live "/users/confirm/:token", Live.Auth.UserConfirmation, :edit + live "/users/confirm", Live.Auth.UserConfirmationInstructions, :new end end end diff --git a/test/gym_live_web/live/user_confirmation_live_test.exs b/test/gym_live_web/live/user_confirmation_live_test.exs index e354bc4..ec0cad1 100644 --- a/test/gym_live_web/live/user_confirmation_live_test.exs +++ b/test/gym_live_web/live/user_confirmation_live_test.exs @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserConfirmationLiveTest do +defmodule GymLiveWeb.Live.Auth.UserConfirmationTest do use GymLiveWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/gym_live_web/live/user_login_live_test.exs b/test/gym_live_web/live/user_login_live_test.exs index f730580..29e9145 100644 --- a/test/gym_live_web/live/user_login_live_test.exs +++ b/test/gym_live_web/live/user_login_live_test.exs @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserLoginLiveTest do +defmodule GymLiveWeb.Live.Auth.UserLoginTest do use GymLiveWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/gym_live_web/live/user_registration_live_test.exs b/test/gym_live_web/live/user_registration_live_test.exs index 2a8eb0a..51bfc18 100644 --- a/test/gym_live_web/live/user_registration_live_test.exs +++ b/test/gym_live_web/live/user_registration_live_test.exs @@ -1,4 +1,4 @@ -defmodule GymLiveWeb.UserRegistrationLiveTest do +defmodule GymLiveWeb.Live.Auth.UserRegistrationTest do use GymLiveWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/gym_live_web/live/user_settings_live_test.exs b/test/gym_live_web/live/user_settings_live_test.exs index a5b23c5..ff00474 100644 --- a/test/gym_live_web/live/user_settings_live_test.exs +++ b/test/gym_live_web/live/user_settings_live_test.exs @@ -1,7 +1,6 @@ -defmodule GymLiveWeb.UserSettingsLiveTest do +defmodule GymLiveWeb.Live.Auth.UserSettingsTest do use GymLiveWeb.ConnCase - alias GymLive.Account import Phoenix.LiveViewTest import GymLive.AccountFixtures @@ -46,7 +45,7 @@ defmodule GymLiveWeb.UserSettingsLiveTest do |> render_submit() assert result =~ "A link to confirm your email" - assert Account.get_user_by_email(user.email) + assert GymLive.Account.get_user_by_email(user.email) end test "renders errors with invalid data (phx-change)", %{conn: conn} do @@ -115,7 +114,7 @@ defmodule GymLiveWeb.UserSettingsLiveTest do assert Phoenix.Flash.get(new_password_conn.assigns.flash, :info) =~ "Password updated successfully" - assert Account.get_user_by_email_and_password(user.email, new_password) + assert GymLive.Account.get_user_by_email_and_password(user.email, new_password) end test "renders errors with invalid data (phx-change)", %{conn: conn} do @@ -165,7 +164,7 @@ defmodule GymLiveWeb.UserSettingsLiveTest do token = extract_user_token(fn url -> - Account.deliver_user_update_email_instructions(%{user | email: email}, user.email, url) + GymLive.Account.deliver_user_update_email_instructions(%{user | email: email}, user.email, url) end) %{conn: log_in_user(conn, user), token: token, email: email, user: user} @@ -178,8 +177,8 @@ defmodule GymLiveWeb.UserSettingsLiveTest do assert path == ~p"/users/settings" assert %{"info" => message} = flash assert message == "Email changed successfully." - refute Account.get_user_by_email(user.email) - assert Account.get_user_by_email(email) + refute GymLive.Account.get_user_by_email(user.email) + assert GymLive.Account.get_user_by_email(email) # use confirm token again {:error, redirect} = live(conn, ~p"/users/settings/confirm_email/#{token}") @@ -195,7 +194,7 @@ defmodule GymLiveWeb.UserSettingsLiveTest do assert path == ~p"/users/settings" assert %{"error" => message} = flash assert message == "Email change link is invalid or it has expired." - assert Account.get_user_by_email(user.email) + assert GymLive.Account.get_user_by_email(user.email) end test "redirects if user is not logged in", %{token: token} do From 24fa7e8810447f19232913e1dfe4c9f86faecde2 Mon Sep 17 00:00:00 2001 From: abdullathedruid Date: Thu, 28 Nov 2024 01:33:57 +0000 Subject: [PATCH 3/4] fix: restore live dashboard and swoosh mailbox preview routes --- lib/gym_live_web/router.ex | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/gym_live_web/router.ex b/lib/gym_live_web/router.ex index 92c7b9f..3bd6cd7 100644 --- a/lib/gym_live_web/router.ex +++ b/lib/gym_live_web/router.ex @@ -17,6 +17,19 @@ defmodule GymLiveWeb.Router do plug :accepts, ["json"] end + # Development routes + if Application.compile_env(:gym_live, :dev_routes) do + # Enable LiveDashboard and Swoosh mailbox preview in development + import Phoenix.LiveDashboard.Router + + scope "/dev" do + pipe_through :browser + + live_dashboard "/dashboard", metrics: GymLiveWeb.Telemetry + forward "/mailbox", Plug.Swoosh.MailboxPreview + end + end + scope "/", GymLiveWeb do pipe_through [:browser, :redirect_if_user_is_authenticated] From 2675278296b2362cb426d25236ff13aeade25be1 Mon Sep 17 00:00:00 2001 From: abdullathedruid Date: Thu, 28 Nov 2024 01:35:28 +0000 Subject: [PATCH 4/4] style: format code --- lib/gym_live_web/router.ex | 5 ++++- test/gym_live_web/live/user_settings_live_test.exs | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/gym_live_web/router.ex b/lib/gym_live_web/router.ex index 3bd6cd7..3f95e80 100644 --- a/lib/gym_live_web/router.ex +++ b/lib/gym_live_web/router.ex @@ -50,7 +50,10 @@ defmodule GymLiveWeb.Router do pipe_through [:browser, :require_authenticated_user] live_session :require_authenticated_user, - on_mount: [{GymLiveWeb.UserAuth, :ensure_authenticated}, GymLiveWeb.Live.Components.Layout.Nav] do + on_mount: [ + {GymLiveWeb.UserAuth, :ensure_authenticated}, + GymLiveWeb.Live.Components.Layout.Nav + ] do live "/users/settings", Live.Auth.UserSettings, :edit live "/users/settings/confirm_email/:token", Live.Auth.UserSettings, :confirm_email diff --git a/test/gym_live_web/live/user_settings_live_test.exs b/test/gym_live_web/live/user_settings_live_test.exs index ff00474..be763b1 100644 --- a/test/gym_live_web/live/user_settings_live_test.exs +++ b/test/gym_live_web/live/user_settings_live_test.exs @@ -164,7 +164,11 @@ defmodule GymLiveWeb.Live.Auth.UserSettingsTest do token = extract_user_token(fn url -> - GymLive.Account.deliver_user_update_email_instructions(%{user | email: email}, user.email, url) + GymLive.Account.deliver_user_update_email_instructions( + %{user | email: email}, + user.email, + url + ) end) %{conn: log_in_user(conn, user), token: token, email: email, user: user}