spec/ziptz_spec.rb in ziptz-1.0.35 vs spec/ziptz_spec.rb in ziptz-1.1.35
- old
+ new
@@ -23,15 +23,26 @@
expect(ziptz.time_zone_name('xyz')).to be_nil
end
end
end
- describe '#time_zone_offset' do
+ describe '#time_zone_uses_dst?' do
let(:ziptz) { Ziptz.new }
context 'when given a 5-digit zipcode' do
it 'returns the time zone number' do
- expect(ziptz.time_zone_offset('97034')).to eq -8
+ expect(ziptz.time_zone_name('97034')).to eq 'Pacific'
+ end
+ end
+ end
+
+ describe '#time_zone_offset' do
+ let(:ziptz) { Ziptz.new }
+
+ context 'when given a 5-digit zipcode' do
+ it 'returns a boolean' do
+ expect(ziptz.time_zone_uses_dst?('97034')).to eq true
+ expect(ziptz.time_zone_uses_dst?('85004')).to eq false
end
end
context 'when there is no matching zipcode' do
it 'returns nil' do