Skip to content

Commit

Permalink
Reformat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpage authored and TylerBrock committed Jan 8, 2019
1 parent 238fd66 commit 0269905
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions config/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,27 @@ func TestGetTimeAbsoluteRFC3339(t *testing.T) {
func TestGetTimeAbsoluteSimpleDate(t *testing.T) {
absoluteTime1, err := getTime("2018-06-26", testTimeNow)

if err != nil && absoluteTime1.Year() == 2018 && absoluteTime1.Month() == 6 && absoluteTime1.Day() == 26 && absoluteTime1.Hour() == 0 && absoluteTime1.Minute() == 0 && absoluteTime1.Second() == 0 {
if err != nil &&
absoluteTime1.Year() == 2018 &&
absoluteTime1.Month() == 6 &&
absoluteTime1.Day() == 26 &&
absoluteTime1.Hour() == 0 &&
absoluteTime1.Minute() == 0 &&
absoluteTime1.Second() == 0 {
t.Errorf("Expected to parse absolute time from simple string. Error: %s", err)
}
}

func TestGetTimeAbsoluteSimpleDateAndTime(t *testing.T) {
absoluteTime1, err := getTime("2018-06-26 12:43:30", testTimeNow)

if err != nil && absoluteTime1.Year() == 2018 && absoluteTime1.Month() == 6 && absoluteTime1.Day() == 26 && absoluteTime1.Hour() == 12 && absoluteTime1.Minute() == 43 && absoluteTime1.Second() == 30 {
if err != nil &&
absoluteTime1.Year() == 2018 &&
absoluteTime1.Month() == 6 &&
absoluteTime1.Day() == 26 &&
absoluteTime1.Hour() == 12 &&
absoluteTime1.Minute() == 43 &&
absoluteTime1.Second() == 30 {
t.Errorf("Expected to parse absolute time from simple string. Error: %s", err)
}
}

0 comments on commit 0269905

Please sign in to comment.