mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Disallow EPP domain:update/transfer/delete if a domain has "deleteCandidate" status
#355
This commit is contained in:
parent
f26783d340
commit
7d1a5558b0
12 changed files with 225 additions and 0 deletions
17
spec/models/concerns/domain/deletable_spec.rb
Normal file
17
spec/models/concerns/domain/deletable_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Domain, db: false do
|
||||
describe '#discarded?' do
|
||||
context 'when :deleteCandidate status is present' do
|
||||
let(:domain) { described_class.new(statuses: [DomainStatus::DELETE_CANDIDATE]) }
|
||||
|
||||
specify { expect(domain).to be_discarded }
|
||||
end
|
||||
|
||||
context 'when :deleteCandidate status is absent' do
|
||||
let(:domain) { described_class.new(statuses: []) }
|
||||
|
||||
specify { expect(domain).to_not be_discarded }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue