mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
52 lines
1 KiB
Ruby
52 lines
1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :user do
|
|
sequence :email do |n|
|
|
"user#{n}@example.com"
|
|
end
|
|
|
|
status { :active }
|
|
active_until { 1000.years.from_now }
|
|
|
|
password { SecureRandom.hex(8) }
|
|
|
|
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
|
|
|
|
trait :admin do
|
|
admin { true }
|
|
end
|
|
|
|
trait :inactive do
|
|
status { :inactive }
|
|
active_until { 1.day.ago }
|
|
end
|
|
|
|
trait :with_immich_integration do
|
|
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
|