Sha256: f8f2b8fb147637ec1f15b6611e0e0ba3372c02958bfba690efb5a2b9cc92104d
Contents?: true
Size: 955 Bytes
Versions: 4
Compression:
Stored size: 955 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe "Zerigo::DNS::Zone.find_or_create" do it 'should create zone' do Zerigo::DNS::Zone.stub!(:find).and_return([]) Zerigo::DNS::Zone.stub!(:create).and_return(:success => true) Zerigo::DNS::Zone.find_or_create('jackhq.com')[:success].should be_true end it 'should find zone' do jackhq = mock('Zerigo::DNS::Zone') jackhq.stub!(:domain).and_return('example.com') Zerigo::DNS::Zone.stub!(:find).and_return([jackhq]) Zerigo::DNS::Zone.stub!(:create).and_return(:success => false) Zerigo::DNS::Zone.find_or_create('example.com').domain == 'example.com' end it 'should find zone by domain' do jackhq = mock('Zerigo::DNS::Zone') jackhq.stub!(:domain).and_return('example.com') Zerigo::DNS::Zone.stub!(:find).and_return([jackhq]) Zerigo::DNS::Zone.find_by_domain('example.com').domain == 'example.com' end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
zerigo_dns-1.2.0 | spec/lib/zone_spec.rb |
zerigo_dns-1.1.4 | spec/lib/zone_spec.rb |
zerigo_dns-1.1.3 | spec/lib/zone_spec.rb |
zerigo_dns-1.1.2 | spec/lib/zone_spec.rb |