mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
20 lines
466 B
Go
20 lines
466 B
Go
package errors_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
|
)
|
|
|
|
func TestErrorMethod(t *testing.T) {
|
|
err := caos_errs.ThrowError(nil, "id", "msg")
|
|
expected := "ID=id Message=msg"
|
|
assert.Equal(t, expected, err.Error())
|
|
|
|
err = caos_errs.ThrowError(err, "subID", "subMsg")
|
|
subExptected := "ID=subID Message=subMsg Parent=(ID=id Message=msg)"
|
|
assert.Equal(t, subExptected, err.Error())
|
|
}
|