Disallow EPP domain:update/transfer/delete if a domain has "deleteCandidate" status

#355
This commit is contained in:
Artur Beljajev 2017-01-30 14:04:56 +02:00
parent f26783d340
commit 7d1a5558b0
12 changed files with 225 additions and 0 deletions

View 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