Fix unknown user variable after deletion #908
Annotations
5 errors
Run 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:
end.to(have_enqueued_mail(UserCleanerMailer, :pending_deletion_email)
.with { |args| expect(args).to include(40) })
TypeError:
no implicit conversion of Integer into String
|
Run unit tests:
spec/models/user_cleaner_spec.rb#L224
UserCleaner mails when a deletion date is assigned enqueues additional deletion warning mails
Failure/Error:
end.to(have_enqueued_mail(UserCleanerMailer, :pending_deletion_email)
.with { |args| expect(args).to include(num_days) })
TypeError:
no implicit conversion of Integer into String
|
Run unit tests:
spec/models/user_cleaner_spec.rb#L250
UserCleaner mails when a user is finally deleted enqueues a deletion mail
Failure/Error:
end.to(have_enqueued_mail(UserCleanerMailer, :deletion_email)
.with { |args| expect(args).to include(user.email) })
NameError:
undefined local variable or method `user' for #<RSpec::ExampleGroups::UserCleaner::Mails::WhenAUserIsFinallyDeleted "enqueues a deletion mail" (./spec/models/user_cleaner_spec.rb:250)>
Did you mean? super
|
Run unit tests:
spec/models/user_cleaner_spec.rb#L272
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 4, expected 3)
|
Run unit tests
Process completed with exit code 1.
|
Loading