vrfs-774: adding back old db col names
This commit is contained in:
parent
a0cc0f83eb
commit
418f5b5109
|
|
@ -19,25 +19,25 @@ describe MaxMindIsp do
|
|||
MaxMindIsp.import_from_max_mind(ISP_CSV)
|
||||
end
|
||||
|
||||
let(:first) { MaxMindIsp.find_by_ip_bottom('1.0.0.0') }
|
||||
let(:second) { MaxMindIsp.find_by_ip_bottom('1.0.1.0') }
|
||||
let(:third) { MaxMindIsp.find_by_ip_bottom('1.0.4.0') }
|
||||
let(:first) { MaxMindIsp.find_by_ip_bottom(MaxMindIsp.ip_address_to_int('1.0.0.0')) }
|
||||
let(:second) { MaxMindIsp.find_by_ip_bottom(MaxMindIsp.ip_address_to_int('1.0.1.0')) }
|
||||
let(:third) { MaxMindIsp.find_by_ip_bottom(MaxMindIsp.ip_address_to_int('1.0.4.0')) }
|
||||
|
||||
it { MaxMindIsp.count.should == 3 }
|
||||
|
||||
it { first.country.should == 'AU' }
|
||||
it { first.ip_bottom.should == '1.0.0.0' }
|
||||
it { first.ip_top.should == '1.0.0.255' }
|
||||
it { first.ip_bottom.should == MaxMindIsp.ip_address_to_int('1.0.0.0') }
|
||||
it { first.ip_top.should == MaxMindIsp.ip_address_to_int('1.0.0.255') }
|
||||
it { first.isp.should == 'APNIC Debogon Project' }
|
||||
|
||||
it { second.country.should == 'CN' }
|
||||
it { second.ip_bottom.should == '1.0.1.0' }
|
||||
it { second.ip_top.should == '1.0.1.255' }
|
||||
it { second.ip_bottom.should == MaxMindIsp.ip_address_to_int('1.0.1.0') }
|
||||
it { second.ip_top.should == MaxMindIsp.ip_address_to_int('1.0.1.255') }
|
||||
it { second.isp.should == 'Chinanet Fujian Province Network' }
|
||||
|
||||
it { third.country.should == 'AU' }
|
||||
it { third.ip_bottom.should == '1.0.4.0' }
|
||||
it { third.ip_top.should == '1.0.7.255' }
|
||||
it { third.ip_bottom.should == MaxMindIsp.ip_address_to_int('1.0.4.0') }
|
||||
it { third.ip_top.should == MaxMindIsp.ip_address_to_int('1.0.7.255') }
|
||||
it { third.isp.should == 'Bigred,inc' }
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue