a11yist/test/controllers/backoffice_controller_test.rb
david 6e1a17281d
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
Fix tests
2024-09-22 22:49:53 +02:00

27 lines
535 B
Ruby

require "test_helper"
class BackofficeControllerTest < 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 get show" do
get backoffice_url
assert_response :success
end
end