mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-21 16:19:21 +01:00
18 lines
253 B
Go
18 lines
253 B
Go
package error
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestError(t *testing.T) {
|
|
err := &Error{
|
|
StatusCode: 404,
|
|
Detail: "not found",
|
|
}
|
|
|
|
if err.Error() != "404 not found" {
|
|
t.Fatalf("unexpected content: %s != %s",
|
|
err.Error(), "404 not found")
|
|
}
|
|
}
|