Fix unknown user variable after deletion #907
tests.yml
on: pull_request
Unit tests
4m 21s
e2e (Cypress)
4m 27s
Annotations
8 errors
Unit tests:
spec/models/user_cleaner_spec.rb#L194
UserCleaner mails when setting a deletion date enqueues a deletion warning mail (40 days)
Failure/Error:
expect do
UserCleaner.new.set_deletion_date_for_inactive_users
end.to have_enqueued_mail(UserCleanerMailer, :pending_deletion_email)
.with(a_hash_including(args: [40]))
expected to enqueue UserCleanerMailer.pending_deletion_email exactly 1 time with [#<RSpec::Matchers::BuiltIn::Include:0x00007f011f0b07d0 @expectedS=[{:args=>[40]}], @matcher_name=:a_hash_including>], but enqueued 0
Queued deliveries:
UserCleanerMailer.pending_deletion_email with ["[email protected]", "en", 40], on queue default
|
Unit tests:
spec/models/user_cleaner_spec.rb#L224
UserCleaner mails when a deletion date is assigned enqueues additional deletion warning mails
Failure/Error:
expect do
UserCleaner.new.send_additional_warning_mails
end.to have_enqueued_mail(UserCleanerMailer, :pending_deletion_email)
.with(a_hash_including(args: [num_days]))
expected to enqueue UserCleanerMailer.pending_deletion_email exactly 1 time with [#<RSpec::Matchers::BuiltIn::Include:0x00007f011dce6e20 @expectedS=[{:args=>[14]}], @matcher_name=:a_hash_including>], but enqueued 0
Queued deliveries:
UserCleanerMailer.pending_deletion_email with ["[email protected]", "en", 14], on queue default
|
Unit tests:
spec/models/user_cleaner_spec.rb#L270
UserCleaner#pending_deletion_mail has mail subject containing the number of days until deletion
Failure/Error:
def pending_deletion_email(user_email, user_locale, num_days_until_deletion)
sender = "#{t("mailer.warning")} <#{DefaultSetting::PROJECT_EMAIL}>"
I18n.locale = user_locale
@num_days_until_deletion = num_days_until_deletion
subject = t("mailer.pending_deletion_subject",
num_days_until_deletion: @num_days_until_deletion)
mail(from: sender, to: user_email, subject: subject, priority: "high")
end
ArgumentError:
wrong number of arguments (given 1, expected 3)
|
Unit tests:
spec/models/user_cleaner_spec.rb#L277
UserCleaner#pending_deletion_mail has mail subject localized to the user's locale
Failure/Error:
def pending_deletion_email(user_email, user_locale, num_days_until_deletion)
sender = "#{t("mailer.warning")} <#{DefaultSetting::PROJECT_EMAIL}>"
I18n.locale = user_locale
@num_days_until_deletion = num_days_until_deletion
subject = t("mailer.pending_deletion_subject",
num_days_until_deletion: @num_days_until_deletion)
mail(from: sender, to: user_email, subject: subject, priority: "high")
end
ArgumentError:
wrong number of arguments (given 1, expected 3)
|
Unit tests:
spec/models/user_cleaner_spec.rb#L287
UserCleaner#pending_deletion_mail has mail body localized to the user's locale
Failure/Error:
def pending_deletion_email(user_email, user_locale, num_days_until_deletion)
sender = "#{t("mailer.warning")} <#{DefaultSetting::PROJECT_EMAIL}>"
I18n.locale = user_locale
@num_days_until_deletion = num_days_until_deletion
subject = t("mailer.pending_deletion_subject",
num_days_until_deletion: @num_days_until_deletion)
mail(from: sender, to: user_email, subject: subject, priority: "high")
end
ArgumentError:
wrong number of arguments (given 1, expected 3)
|
Unit tests:
spec/models/user_cleaner_spec.rb#L305
UserCleaner#deletion_mail has mail subject localized to the user's locale
Failure/Error:
def deletion_email(user_email, user_locale)
sender = "#{t("mailer.warning")} <#{DefaultSetting::PROJECT_EMAIL}>"
I18n.locale = user_locale
subject = t("mailer.deletion_subject")
mail(from: sender, to: user_email, subject: subject, priority: "high")
end
ArgumentError:
wrong number of arguments (given 0, expected 2)
|
Unit tests:
spec/models/user_cleaner_spec.rb#L315
UserCleaner#deletion_mail has mail body localized to the user's locale
Failure/Error:
def deletion_email(user_email, user_locale)
sender = "#{t("mailer.warning")} <#{DefaultSetting::PROJECT_EMAIL}>"
I18n.locale = user_locale
subject = t("mailer.deletion_subject")
mail(from: sender, to: user_email, subject: subject, priority: "high")
end
ArgumentError:
wrong number of arguments (given 0, expected 2)
|
Unit tests
Process completed with exit code 1.
|