mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-19 07:32:34 +08:00
857bda6f69
- Models tests - Controllers tests - Jobs tests - Permissions tests - Utilities tests
18 lines
500 B
Ruby
18 lines
500 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :settings do
|
|
type { Faker::Lorem.sentence.split(' ').sample }
|
|
values { { key_of_data: Faker::Lorem.sentence.split(' ').sample } }
|
|
|
|
trait :with_load_values_from_env_defined do
|
|
after(:build) do |application_settings|
|
|
application_settings.define_singleton_method(:load_values_from_env) do
|
|
{
|
|
some_key: Faker::Lorem.sentence.split(' ').sample
|
|
}
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|