Sha256: cc340c901882b9f916ff0d5116f1ed55eb2535937633c1766772a407edb80389

Contents?: true

Size: 673 Bytes

Versions: 6

Compression:

Stored size: 673 Bytes

Contents

require "application_system_test_case"

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

  test "executing sudo" do
    visit new_sudo_url(proceed_to_url: edit_password_url)
    fill_in :password, with: "Secret123456"
    click_on "Continue"

    assert_selector "h1", text: "Change your password"
  end

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

    assert_current_path root_path
    return <%= singular_table_name %>
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
authentication-zero-2.4.0 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt
authentication-zero-2.3.6 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt
authentication-zero-2.3.5 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt
authentication-zero-2.3.4 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt
authentication-zero-2.3.3 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt
authentication-zero-2.3.2 lib/generators/authentication/templates/test_unit/system/sudos_test.rb.tt