Sha256: ea136621021737bdef5752a6c669f447f5d7ad9b7c126328c4d06cae6915c5f7
Contents?: true
Size: 999 Bytes
Versions: 3
Compression:
Stored size: 999 Bytes
Contents
require 'spec_helper' describe Dnsdeploy::Base do let(:domain) { DNSimple::Domain.new name: random_domain } let(:name) { random_string } let(:record_type) { random_string } let(:content) { random_string } let(:ttl) { random_number } let(:prio) { random_number } let(:local) { double(:local, domains: [domain], records: [record]) } let(:record) { Dnsdeploy::Record.new(domain: domain, name: name, record_type: record_type, content: content, ttl: ttl, prio: prio ) } let(:records_file) { 'spec/assets/records.json' } subject(:base) { described_class.new(records_file) } before do allow(DNSimple::Record).to receive(:all).and_return([]) allow(Dnsdeploy::Local).to receive(:new).and_return local end it "should create records" do expect(DNSimple::Record).to receive(:create).with(domain, name, record_type, content, {ttl: ttl, prio: prio }) base.update_records end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dnsdeploy-0.0.3 | spec/dnsdeploy/base_spec.rb |
dnsdeploy-0.0.2 | spec/dnsdeploy/base_spec.rb |
dnsdeploy-0.0.1 | spec/dnsdeploy/base_spec.rb |