2020-10-29 14:22:53 -04:00
|
|
|
// Copyright 2020 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2020-10-06 04:05:26 -04:00
|
|
|
package externalaccount
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2020-10-27 14:58:39 -04:00
|
|
|
func TestError(t *testing.T) {
|
2020-10-06 04:05:26 -04:00
|
|
|
e := Error{
|
|
|
|
"42",
|
|
|
|
"http:thisIsAPlaceholder",
|
|
|
|
"The Answer!",
|
|
|
|
}
|
2020-10-19 04:43:14 -04:00
|
|
|
want := "got error code 42 from http:thisIsAPlaceholder: The Answer!"
|
2020-10-19 04:40:53 -04:00
|
|
|
if got := e.Error(); got != want {
|
2020-10-06 04:05:26 -04:00
|
|
|
t.Errorf("Got error message %q; want %q", got, want)
|
|
|
|
}
|
2020-10-06 04:18:45 -04:00
|
|
|
}
|