mirror of
https://github.com/docker/docs.git
synced 2026-03-28 23:08:49 +07:00
20 lines
261 B
Go
20 lines
261 B
Go
package errors
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestHTTPError(t *testing.T) {
|
|
err := HTTPError{
|
|
400,
|
|
1234,
|
|
fmt.Errorf("Test error"),
|
|
}
|
|
errStr := err.Error()
|
|
|
|
if errStr != "1234: Test error" {
|
|
t.Fatalf("Error did not create expected string")
|
|
}
|
|
}
|