[Housekeeping] Refactor settings model (#165)

* [WIP] renamed current settings module and tables to have backup suffix

* Created new settings table, schema, and context

* Migrated from old settings module to new one

* Removed settings backup modules

* Added some tests and docs
This commit is contained in:
Kieran
2024-04-04 12:43:17 -07:00
committed by GitHub
parent d9053fff0c
commit 24875eaeac
12 changed files with 171 additions and 183 deletions
@@ -10,7 +10,7 @@ defmodule PinchflatWeb.PageControllerTest do
end
test "displays the onboarding page when onboarding is forced", %{conn: conn} do
Settings.set!(:onboarding, false)
Settings.set(onboarding: false)
conn = get(conn, ~p"/?onboarding=1")
assert html_response(conn, 200) =~ "Welcome to Pinchflat"
@@ -25,7 +25,7 @@ defmodule PinchflatWeb.PageControllerTest do
end
test "displays the home page when not onboarding", %{conn: conn} do
Settings.set!(:onboarding, false)
Settings.set(onboarding: false)
conn = get(conn, ~p"/")
assert html_response(conn, 200) =~ "MENU"