Browse Source

test serial updates correctly

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
6450b1698d
  1. 6
      spec/models/domain_spec.rb

6
spec/models/domain_spec.rb

@ -5,6 +5,7 @@ describe Domain do
domain = Factory.build(:domain)
domain.setup(FactoryGirl.generate(:email))
domain.save!
domain.soa_record.update_serial!
domain
}
@ -22,6 +23,10 @@ describe Domain do
it "has correct records" do
domain.records.count.should == 3
end
it "has a soa serial updated" do
(domain.soa_record.serial % 10).should == 1
end
it "updates name to records when name changed" do
domain.update_attributes(:name => "changed#{domain.name}")
@ -30,5 +35,6 @@ describe Domain do
for record in domain.records.all
record.name.should =~ /#{domain.name}$/
end
(domain.soa_record.serial % 10).should == 0
end
end

Loading…
Cancel
Save