mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Return pending_update? value based on status, regardless of force delete state
This commit is contained in:
parent
248c984443
commit
4917539a7d
2 changed files with 11 additions and 1 deletions
|
@ -489,7 +489,7 @@ class Domain < ApplicationRecord
|
|||
end
|
||||
|
||||
def pending_update?
|
||||
statuses.include?(DomainStatus::PENDING_UPDATE) && !statuses.include?(DomainStatus::FORCE_DELETE)
|
||||
statuses.include?(DomainStatus::PENDING_UPDATE)
|
||||
end
|
||||
|
||||
# depricated not used, not valid
|
||||
|
|
|
@ -242,4 +242,14 @@ class NewDomainForceDeleteTest < ActiveSupport::TestCase
|
|||
|
||||
assert_not_includes(@domain.statuses, asserted_status)
|
||||
end
|
||||
|
||||
def test_does_force_delete_does_not_affect_pending_update_check
|
||||
@domain.schedule_force_delete(type: :soft)
|
||||
@domain.reload
|
||||
|
||||
@domain.statuses << DomainStatus::PENDING_DELETE
|
||||
|
||||
assert @domain.force_delete_scheduled?
|
||||
assert @domain.pending_update?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue