Browse Source

dnsbl.org off

pull/1/head
Nicolae Claudius 10 years ago
parent
commit
350efa9244
  1. 2
      app/models/blacklisted_domain.rb
  2. 2
      spec/lib/dnsbl_spec.rb
  3. 2
      spec/models/blacklisted_domain_spec.rb

2
app/models/blacklisted_domain.rb

@ -10,6 +10,6 @@ class BlacklistedDomain < ActiveRecord::Base
} }
def self.include?(domain_name) def self.include?(domain_name)
of(domain_name).exists? || Dnsbl.include?(domain_name) of(domain_name).exists? # || Dnsbl.include?(domain_name)
end end
end end

2
spec/lib/dnsbl_spec.rb

@ -1,5 +1,7 @@
require 'spec_helper' require 'spec_helper'
__END__
describe Dnsbl do describe Dnsbl do
include_context "data" include_context "data"

2
spec/models/blacklisted_domain_spec.rb

@ -7,7 +7,7 @@ describe BlacklistedDomain do
blacklisted_domain blacklisted_domain
BlacklistedDomain.should include(blacklisted_domain.name) BlacklistedDomain.should include(blacklisted_domain.name)
BlacklistedDomain.should include("sub.#{blacklisted_domain.name}") BlacklistedDomain.should include("sub.#{blacklisted_domain.name}")
BlacklistedDomain.should include("place4porn.net") # BlacklistedDomain.should include("place4porn.net")
BlacklistedDomain.should_not include(FactoryGirl.generate(:domain_name)) BlacklistedDomain.should_not include(FactoryGirl.generate(:domain_name))
end end
end end

Loading…
Cancel
Save