Commit 010b1fcd authored by Nina's avatar Nina

Use dynamic attributes to fix FactoryBot deprecation warning

> Static attributes will be removed in FactoryBot 5.0. Please use dynamic
> attributes instead by wrapping the attribute value in a block:
parent a5e769db
Pipeline #20291 passed with stages
in 26 minutes and 53 seconds
FactoryBot.define do
factory :list do
sequence(:email) {|n| "list#{n}@example.org" }
fingerprint "59C71FB38AEE22E091C78259D06350440F759BD3"
log_level "warn"
subject_prefix nil
subject_prefix_in nil
subject_prefix_out nil
openpgp_header_preference "signencrypt"
internal_footer nil
public_footer nil
headers_to_meta ["from", "to", "cc", "date"]
bounces_drop_on_headers "x-spam-flag" => true
keywords_admin_only ["subscribe", "unsubscribe", "delete-key"]
keywords_admin_notify ["add-key"]
send_encrypted_only true
receive_encrypted_only false
receive_signed_only false
receive_authenticated_only false
receive_from_subscribed_emailaddresses_only false
receive_admin_only false
keep_msgid true
bounces_drop_all false
bounces_notify_admins true
include_list_headers true
include_openpgp_header true
max_message_size_kb 10240
language "en"
forward_all_incoming_to_admins false
logfiles_to_keep 2
fingerprint { "59C71FB38AEE22E091C78259D06350440F759BD3" }
log_level { "warn" }
subject_prefix { nil }
subject_prefix_in { nil }
subject_prefix_out { nil }
openpgp_header_preference { "signencrypt" }
internal_footer { nil }
public_footer { nil }
headers_to_meta { ["from", "to", "cc", "date"] }
bounces_drop_on_headers { { "x-spam-flag" => true } }
keywords_admin_only { ["subscribe", "unsubscribe", "delete-key"] }
keywords_admin_notify { ["add-key"] }
send_encrypted_only { true }
receive_encrypted_only { false }
receive_signed_only { false }
receive_authenticated_only { false }
receive_from_subscribed_emailaddresses_only { false }
receive_admin_only { false }
keep_msgid { true }
bounces_drop_all { false }
bounces_notify_admins { true }
include_list_headers { true }
include_openpgp_header { true }
max_message_size_kb { 10240 }
language { "en" }
forward_all_incoming_to_admins { false }
logfiles_to_keep { 2 }
after(:build) do |list|
FileUtils.mkdir_p(list.listdir)
gpghome_upstream = File.join "spec", "gnupg"
......
......@@ -2,8 +2,8 @@ FactoryBot.define do
factory :subscription do
list
sequence(:email) {|n| "subscription#{n}@example.org" }
fingerprint "129A74AD5317457F9E502844A39C61B32003A8D8"
admin true
delivery_enabled true
fingerprint { "129A74AD5317457F9E502844A39C61B32003A8D8" }
admin { true }
delivery_enabled { true }
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment