Sha256: 34319a80f08349c68879681d229eef501d077dd622cf94250816e67c1a5d7cf7
Contents?: true
Size: 930 Bytes
Versions: 6
Compression:
Stored size: 930 Bytes
Contents
require "application_system_test_case" class SessionsTest < ApplicationSystemTestCase setup do @<%= singular_table_name %> = <%= table_name %>(:lazaro_nixon) end test "visiting the index" do sign_in_as @<%= singular_table_name %> click_on "Devices & Sessions" assert_selector "h1", text: "Sessions" end test "signing in" do visit sign_in_url fill_in "Email", with: @<%= singular_table_name %>.email fill_in "Password", with: "secret123" click_on "Sign in" assert_text "Signed in successfully" end test "signing out" do sign_in_as @<%= singular_table_name %> click_on "Log out" assert_selector "h1", text: "Sign in" end def sign_in_as(<%= singular_table_name %>) visit sign_in_url fill_in :email, with: <%= singular_table_name %>.email fill_in :password, with: "secret123" click_on "Sign in" return <%= singular_table_name %> end end
Version data entries
6 entries across 6 versions & 1 rubygems