Sha256: 4e6a40335bf254a72a6fac7f1ed2f123dfffb4729d8fe67a8d2df387ade93f9e
Contents?: true
Size: 664 Bytes
Versions: 8
Compression:
Stored size: 664 Bytes
Contents
require 'glare' RSpec.describe 'delete domain' do context 'when a domain is registered' do let(:domain) { 'a.flywire.cc' } let(:type) { 'A' } let(:destination) { ['1.2.3.5', '6.7.8.9'] } before do register_domain(domain, destination) end it 'deletes all records with given type' do expect(resolve(domain)).to eq(destination) delete(domain) expect(resolve(domain)).to eq([]) end end def delete(domain) Glare.deregister(domain, type) end def resolve(domain) Glare.resolve(domain, type) end def register_domain(domain, destination) Glare.register(domain, destination, type) end end
Version data entries
8 entries across 8 versions & 1 rubygems