domain_resource_spec.rb 397 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe DomainResource do
  4. describe '#mx' do
  5. subject { described_class.new(domain) }
  6. let(:domain) { 'example.host' }
  7. let(:exchange) { 'mx.host' }
  8. before { configure_mx(domain: domain, exchange: exchange) }
  9. it 'returns array of hostnames' do
  10. expect(subject.mx)
  11. .to eq([exchange])
  12. end
  13. end
  14. end