Sha256: b9acfb1d9a73d795e2693e7dbbc3143fd07a16f43d9844171630a3b66ca77817

Contents?: true

Size: 771 Bytes

Versions: 5

Compression:

Stored size: 771 Bytes

Contents

require "application_system_test_case"

class SessionsTest < ApplicationSystemTestCase
  setup do
    @<%= singular_table_name %> = <%= table_name %>(:lazaro_nixon)
  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_text "Signed out successfully"
  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

5 entries across 5 versions & 1 rubygems

Version Path
authentication-zero-1.0.2 lib/generators/authentication/templates/test_unit/system/sessions_test.rb.tt
authentication-zero-1.0.1 lib/generators/authentication/templates/test_unit/system/sessions_test.rb.tt
authentication-zero-1.0.0 lib/generators/authentication/templates/test_unit/system/sessions_test.rb.tt
authentication-zero-0.0.24 lib/generators/authentication/templates/test_unit/system/sessions_test.rb.tt
authentication-zero-0.0.23 lib/generators/authentication/templates/test_unit/system/sessions_test.rb.tt