Sha256: e41dea2535f965c85e3ffb08b6672f0a2eae65adaebfbb3b9121f291a4dcce69

Contents?: true

Size: 840 Bytes

Versions: 4

Compression:

Stored size: 840 Bytes

Contents

ENV["RAILS_ENV"] ||= "test"
require_relative "../config/environment"
require "rails/test_help"

class ActiveSupport::TestCase
  # Run tests in parallel with specified workers
  parallelize(workers: :number_of_processors)

  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  fixtures :all

  # Add more helper methods to be used by all tests here...
  <%- if options.api? -%>
  def sign_in_as(<%= singular_table_name %>)
    post(sign_in_url, params: { email: <%= singular_table_name %>.email, password: "Secret1*3*5*" }); [<%= singular_table_name %>, response.headers["X-Session-Token"]]
  end
  <%- else -%>
  def sign_in_as(<%= singular_table_name %>)
    post(sign_in_url, params: { email: <%= singular_table_name %>.email, password: "Secret1*3*5*" }); <%= singular_table_name %>
  end
  <%- end -%>
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
authentication-zero-2.11.2 lib/generators/authentication/templates/test_unit/test_helper.rb.tt
authentication-zero-2.11.1 lib/generators/authentication/templates/test_unit/test_helper.rb.tt
authentication-zero-2.11.0 lib/generators/authentication/templates/test_unit/test_helper.rb.tt
authentication-zero-2.10.0 lib/generators/authentication/templates/test_unit/test_helper.rb.tt