20 lines
409 B
Go
20 lines
409 B
Go
package services
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func TestRecordApplicationEventRequiresKind(t *testing.T) {
|
|
_, err := RecordApplicationEvent(&gorm.DB{}, 42, ApplicationEventInput{})
|
|
var inputErr *JobInputError
|
|
if !errors.As(err, &inputErr) {
|
|
t.Fatalf("error = %v, want JobInputError", err)
|
|
}
|
|
if inputErr.Error() != "event kind is required" {
|
|
t.Fatalf("error = %q", inputErr)
|
|
}
|
|
}
|