test: added one more test
This commit is contained in:
parent
4858eaf42e
commit
ec16f91f7b
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue