Migrate to Rais 8.0
Some checks failed
/ Run tests (push) Successful in 2m51s
/ Run system tests (push) Failing after 3m29s
/ Build, push and deploy image (push) Has been cancelled

- Remove all Rodauth stuff and implement simple custom auth
- Migrate from sprockets to propshaft, hack some bootstrap stuff
This commit is contained in:
david 2024-11-08 22:05:31 +01:00
parent 0198a22278
commit c35c7da6e0
66 changed files with 518 additions and 684 deletions

View file

@ -17,19 +17,23 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
end
def login(email, password)
visit "/login"
visit "/session/new"
assert_selector("h1", text: "Login")
fill_in "Login", with: email
fill_in "Password", with: password
fill_in "Passwort", with: password
click_button "Login"
assert_text("Dashboard")
save_screenshot "after_login.png"
end
def logout
visit "/logout"
click_on "Log out"
Session.destroy_all
end
def login_test
Account.create(email: "test@example.com", password: "password")
login("test@example.com", "password")
user = User.find_or_initialize_by(email_address: "test@example.com")
user.update!(password: "password")
login(user.email_address, user.password)
save_screenshot "login.png"
end
end