Fix tests
Some checks failed
/ Run tests (push) Failing after 55s
/ Run system tests (push) Failing after 55s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-09-22 22:49:53 +02:00
parent fbf6923835
commit 6e1a17281d
22 changed files with 235 additions and 13 deletions

View file

@ -4,6 +4,25 @@ require "test_helper"
module Admin
class BackupsControllerTest < ActionDispatch::IntegrationTest
def login(email, password)
post "/login", params: { email: email, password: password }
assert_redirected_to "/"
end
def logout
post "/logout"
assert_redirected_to "/"
end
teardown do
logout
end
setup do
Account.create(email: "test@example.com", password: "password")
login("test@example.com", "password")
end
test "should show admin_backup" do
get admin_backup_url(@admin_backup)
assert_response :success