Nicolae Claudius
13 years ago
6 changed files with 52 additions and 3 deletions
@ -1,5 +1,19 @@
|
||||
require 'spec_helper' |
||||
|
||||
describe Record do |
||||
pending "add some examples to (or delete) #{__FILE__}" |
||||
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 |
||||
end |
||||
|
Loading…
Reference in new issue