harbor/utils/registry/error/error_test.go

18 lines
253 B
Go
Raw Normal View History

package error
import (
"testing"
)
2016-08-10 04:48:58 +02:00
func TestError(t *testing.T) {
err := &Error{
StatusCode: 404,
Detail: "not found",
}
2016-08-10 04:48:58 +02:00
if err.Error() != "404 not found" {
t.Fatalf("unexpected content: %s != %s",
err.Error(), "404 not found")
}
}