diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 5875dc7..964360e 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -38,10 +38,10 @@ jobs: run: go mod vendor - name: Build - run: go build ./ + run: go build main.go - name: Run test & coverage - run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast ./... + run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/api/app/v1/utils/date_test.go b/api/app/v1/utils/date_test.go index 02591a7..b96c3a1 100644 --- a/api/app/v1/utils/date_test.go +++ b/api/app/v1/utils/date_test.go @@ -27,4 +27,14 @@ func TestIsToday(t *testing.T) { t.Error("today should be false:", today) } }) + + t.Run("should return false with no error if no date is supplied", func(t *testing.T) { + today, err := utils.IsToday("") + if err != nil { + t.Error(err.Error()) + } + if today != false { + t.Error("it should be false:", today) + } + }) }