2023-08-15 13:50:39 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-08-08 16:48:09 +00:00
|
|
|
ENV["RAILS_ENV"] ||= "test"
|
|
|
|
require_relative "../config/environment"
|
|
|
|
require "rails/test_help"
|
|
|
|
|
|
|
|
class ActiveSupport::TestCase
|
|
|
|
parallelize(workers: :number_of_processors)
|
|
|
|
|
|
|
|
fixtures :all
|
|
|
|
end
|
2023-09-17 13:59:06 +00:00
|
|
|
|
|
|
|
class ActionDispatch::IntegrationTest
|
|
|
|
def sign_in(user)
|
|
|
|
post sessions_path, params: {
|
|
|
|
username: user.username,
|
|
|
|
password: 'tolkien-abercrombie-hobb-barker',
|
|
|
|
}
|
|
|
|
follow_redirect!
|
|
|
|
assert_includes @response.body, I18n.t("sessions.logged_in")
|
|
|
|
end
|
|
|
|
end
|