oauth2/google/internal/externalaccount/err_test.go

20 lines
471 B
Go
Raw Normal View History

// 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.
package externalaccount
import "testing"
func TestError(t *testing.T) {
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 {
t.Errorf("Got error message %q; want %q", got, want)
}
2020-10-06 04:18:45 -04:00
}