2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-08 16:56:11 -05:00
|
|
|
user =
|
|
|
|
User.where(username: "test_user").first_or_create(
|
|
|
|
name: "Test User",
|
|
|
|
email: "test_user@example.com",
|
|
|
|
password: SecureRandom.hex,
|
|
|
|
username: "test_user",
|
|
|
|
approved: true,
|
|
|
|
active: true,
|
|
|
|
admin: true,
|
|
|
|
)
|
|
|
|
UserAuthToken.generate!(user_id: user.id)
|
|
|
|
ApiKey.create(key: "test_d7fd0429940", user_id: user.id, created_by_id: user.id)
|