From ed4ac03cd055eb13dba6d86a5e485ca747295d65 Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Thu, 17 Aug 2017 11:48:32 -0700 Subject: [PATCH] Test for sanity check --- spec/data/zone_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/data/zone_spec.rb b/spec/data/zone_spec.rb index 3c29aca..71d196c 100644 --- a/spec/data/zone_spec.rb +++ b/spec/data/zone_spec.rb @@ -180,6 +180,10 @@ def stub_time(utc_now) expect( ZoneOffset.detect?('August 9, 6:56 AM -10') ).to be true end + it 'returns false when only given a year' do + expect( ZoneOffset.detect?('August 9, 6:56 AM 2017') ).to be false + end + it 'returns false when part of a date' do expect( ZoneOffset.detect?('2017-10-10') ).to be false end