You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
595 B

13 years ago
require 'spec_helper'
describe Record do
13 years ago
include_context "data"
it "protects DOS on more Settings.max_records_per_domain+ domains" do
max = Settings.max_records_per_domain.to_i
a_record.domain.stub_chain(:records, :count).and_return(max)
a_record.max_records_per_domain
a_record.should have(1).errors
end
it "is DOS-valid on less than Settings.max_records_per_domain domains" do
max = Settings.max_records_per_domain.to_i
a_record.domain.stub_chain(:records, :count).and_return(max)
a_record.max_records_per_domain
a_record.should be_valid
end
13 years ago
end