Sha256: 495a2d7d2e0c9d1009722ed049f9f71635e9b00830d5bb2e3a2d21bba4564865
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'gov_kit-ca/postal_code/strategy/digital-copyright_ca' 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], # differs from all 'T5S2B9' => [48012, 48013, 48014, 48015, 48017, 48018], # differs from all 'K0A1K0' => [35025, 35052, 35063], 'B0J2L0' => [12002, 12007, 12008], }.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
4 entries across 4 versions & 1 rubygems