spec/lib/zone_spec.rb in zerigo_dns-1.1.1 vs spec/lib/zone_spec.rb in zerigo_dns-1.1.2

- old
+ new

@@ -16,8 +16,17 @@ 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