mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 22:46:22 +02:00
This commit addresses several issues with the ProcessClientHold class and its tests: 1. Changed notification text in notify_client_hold method from 'force_delete_set_on_domain' to 'hold_client_on_domain' to better reflect the actual action being performed. Added corresponding translation key in locales/en.yml. 2. Fixed the test_send_mail_delivers_email test by using stub method instead of redefining DomainDeleteMailer.forced, which was causing conflicts with other tests. This ensures that tests are isolated and don't affect each other. 3. Updated all tests to use Domain.stub_any_instance(:force_delete_scheduled?, true) to properly stub the force_delete_scheduled? method. 4. Improved test assertions to ensure proper behavior of the ProcessClientHold class, including notification creation and client hold status setting. 5. Added proper error handling in tests to ensure methods don't raise exceptions. The changes ensure that the ProcessClientHold class correctly handles client hold status for domains in the force delete process, properly notifies registrars with appropriate messages, and sends emails when required. |
||
---|---|---|
.. | ||
fixtures | ||
helpers | ||
integration | ||
interactions | ||
jobs | ||
learning | ||
lib | ||
mailers | ||
models | ||
services | ||
support/assertions | ||
system/admin_area | ||
tasks | ||
application_system_test_case.rb | ||
test_helper.rb |