dawarich/spec/factories/users.rb

45 lines
881 B
Ruby
Raw Normal View History

2024-07-19 14:37:57 -04:00
# frozen_string_literal: true
FactoryBot.define do
2022-10-13 06:00:39 -04:00
factory :user do
sequence :email do |n|
"user#{n}@example.com"
end
password { SecureRandom.hex(8) }
2024-07-19 14:37:57 -04:00
2024-08-28 14:24:35 -04:00
settings do
{
route_opacity: '0.5',
meters_between_routes: '100',
minutes_between_routes: '100',
fog_of_war_meters: '100',
time_threshold_minutes: '100',
merge_threshold_minutes: '100'
}
end
2024-07-19 14:37:57 -04:00
trait :admin do
admin { true }
end
2024-11-26 14:18:08 -05:00
trait :with_immich_integration do
2024-11-26 14:18:08 -05:00
settings do
{
immich_url: 'https://immich.example.com',
immich_api_key: '1234567890'
}
end
end
trait :with_photoprism_integration do
settings do
{
photoprism_url: 'https://photoprism.example.com',
photoprism_api_key: '1234567890'
}
end
end
end
end