tabletop-companion/test/system/sessions_test.rb

18 lines
544 B
Ruby

# frozen_string_literal: true
require "application_system_test_case"
class SignUpsTest < ApplicationSystemTestCase
test "can log in, then out" do
visit new_session_url
fill_in attr_name(User, :username), with: users(:trevor).username
fill_in attr_name(User, :password), with: "password"
click_button I18n.t("sessions.new.log_in")
assert_text I18n.t("sessions.create.success", name: users(:trevor).first_name)
click_on I18n.t("sessions.destroy.log_out")
assert_text I18n.t("sessions.destroy.success")
end
end