Sha256: aa161d5f0f46d38149912bbf499a4e3eb373b62dd4faaa56073ca9e97c1fdf95
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa do describe '#electoral_districts' do it 'should return the electoral districts within a postal code' do { 'G0C2Y0' => [24019, 24039], # too many 24019 'T5S2B9' => [48012, 48013, 48014, 48015, 48017, 48018], # too many 48015 'B0J2L0' => [12002, 12007, 12008], 'K0A1K0' => [35025, 35052, 35063], }.each do |postal_code,electoral_districts| GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa.new(postal_code).electoral_districts.should == electoral_districts end end it 'should return false if a postal code contains no electoral districts' do GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa.new('H0H0H0').electoral_districts.should be_false end it 'should return false if a postal code does not exist' do GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa.new('X1B1B1').electoral_districts.should be_false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
govkit-ca-0.0.11 | spec/digital-copyright_ca_spec.rb |