Sha256: d8fc8b7d8291a3c11b1a6571696a8950ddf0302e6cef3c1864964347eee4622a

Contents?: true

Size: 916 Bytes

Versions: 1

Compression:

Stored size: 916 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_url
    return <%= singular_table_name %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authentication-zero-2.8.0 lib/generators/authentication/templates/test_unit/system/registrations_test.rb.tt