File: err_test.go

package info (click to toggle)
golang-golang-x-oauth2 0.15.0-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 748 kB
  • sloc: makefile: 15
file content (19 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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!",
	}
	want := "got error code 42 from http:thisIsAPlaceholder: The Answer!"
	if got := e.Error(); got != want {
		t.Errorf("Got error message %q; want %q", got, want)
	}
}