Migrate to Rais 8.0
- Remove all Rodauth stuff and implement simple custom auth - Migrate from sprockets to propshaft, hack some bootstrap stuff
This commit is contained in:
parent
0198a22278
commit
c35c7da6e0
66 changed files with 518 additions and 684 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue