Sha256: fc54891a4d59981fab5dde0dea1fcfadd4573c0c32d8e2902bef749fe6d6f946

Contents?: true

Size: 917 Bytes

Versions: 4

Compression:

Stored size: 917 Bytes

Contents

require "application_system_test_case"

class RegistrationsTest < ApplicationSystemTestCase
  setup do
    @<%= singular_table_name %> = <%= table_name %>(:lazaro_nixon)
  end

  test "signing up" do
    visit sign_up_url

    fill_in "Email", with: "lazaronixon@hey.com"
    fill_in "Password", with: "Secret6*4*2*"
    fill_in "Password confirmation", with: "Secret6*4*2*"
    click_on "Sign up"

    assert_text "Welcome! You have signed up successfully"
  end

  test "cancelling my account" do
    sign_in_as @<%= singular_table_name %>

    click_on "Cancel my account & delete my data"
    assert_text "Your account is closed"
  end

  def sign_in_as(<%= singular_table_name %>)
    visit sign_in_url
    fill_in :email, with: <%= singular_table_name %>.email
    fill_in :password, with: "Secret1*3*5*"
    click_on "Sign in"

    assert_current_path root_path
    return <%= singular_table_name %>
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
authentication-zero-2.7.0 lib/generators/authentication/templates/test_unit/system/registrations_test.rb.tt
authentication-zero-2.6.0 lib/generators/authentication/templates/test_unit/system/registrations_test.rb.tt
authentication-zero-2.5.1 lib/generators/authentication/templates/test_unit/system/registrations_test.rb.tt
authentication-zero-2.5.0 lib/generators/authentication/templates/test_unit/system/registrations_test.rb.tt