This repository has been archived on 2024-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
core-old/internal/domain/version_test.go
Dawid Wysokiński c545ebd7d7
All checks were successful
continuous-integration/drone/push Build is passing
refactor: rename domain.UserError -> domain.Error
2022-12-31 11:00:30 +01:00

21 lines
450 B
Go

package domain_test
import (
"testing"
"gitea.dwysokinski.me/twhelp/core/internal/domain"
"github.com/stretchr/testify/assert"
)
func TestVersionNotFoundError(t *testing.T) {
t.Parallel()
err := domain.VersionNotFoundError{
VerCode: "pl",
}
var _ domain.Error = err
assert.Equal(t, "version (code=pl) not found", err.Error())
assert.Equal(t, err.Error(), err.UserError())
assert.Equal(t, domain.ErrorCodeEntityNotFound, err.Code())
}