diff --git a/timeinterval/timeinterval_test.go b/timeinterval/timeinterval_test.go index 5b0e299c..9365c4e1 100644 --- a/timeinterval/timeinterval_test.go +++ b/timeinterval/timeinterval_test.go @@ -163,18 +163,6 @@ var timeStringTestCases = []struct { }, } -var dayOfWeekStringTestCases = []struct { - dowString string - ranges []WeekdayRange - expectError bool -}{ - { - dowString: "['monday:friday', 'saturday']", - ranges: []WeekdayRange{{InclusiveRange{Begin: 1, End: 5}}, {InclusiveRange{Begin: 6, End: 6}}}, - expectError: false, - }, -} - var yamlUnmarshalTestCases = []struct { in string intervals []TimeInterval @@ -471,20 +459,6 @@ func TestParseTimeString(t *testing.T) { } } -func TestParseWeek(t *testing.T) { - for _, tc := range dayOfWeekStringTestCases { - var wr []WeekdayRange - err := yaml.Unmarshal([]byte(tc.dowString), &wr) - if err != nil && !tc.expectError { - t.Errorf("Received unexpected error: %v when parsing %v", err, tc.dowString) - } else if err == nil && tc.expectError { - t.Errorf("Expected error for invalid string %s but didn't receive one", tc.dowString) - } else if !reflect.DeepEqual(wr, tc.ranges) { - t.Errorf("Error parsing time string %s: Want %+v, got %+v", tc.dowString, tc.ranges, wr) - } - } -} - func TestYamlMarshal(t *testing.T) { for _, tc := range yamlUnmarshalTestCases { if tc.expectError {