ToolJet/test/test_helper.rb

17 lines
439 B
Ruby
Raw Normal View History

2021-03-31 13:38:49 +00:00
ENV['RAILS_ENV'] ||= 'test'
2021-04-29 06:41:23 +00:00
require_relative '../config/environment'
require 'rails/test_help'
2021-03-31 13:38:49 +00:00
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
def auth_header(user)
token = JsonWebToken.encode(user_id: user.id)
2021-04-29 06:41:23 +00:00
{ 'Authorization' => token }
end
2021-03-31 13:38:49 +00:00
end