aboutsummaryrefslogtreecommitdiff
path: root/headers_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-01-30 16:45:54 +0100
committerStefan Majewsky <majewsky@gmx.net>2018-01-30 16:45:54 +0100
commita2700ca5e57c6466e48c644da6a0c1c93e5ab70c (patch)
treecd8fe830a64ae13012fdd4220edc7bf82760deca /headers_test.go
parentcad4a10319b98dd15c0a74d0fea13a2da4a0d3cc (diff)
downloadgo-schwift-a2700ca5e57c6466e48c644da6a0c1c93e5ab70c.tar.gz
finalize Account.Post() design, add initial account tests
Failing right now because compileHeaders() is a stub.
Diffstat (limited to 'headers_test.go')
-rw-r--r--headers_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/headers_test.go b/headers_test.go
index 6859690..f00b166 100644
--- a/headers_test.go
+++ b/headers_test.go
@@ -65,17 +65,22 @@ func expectString(t *testing.T, actual string, expected string) {
}
}
-func expectError(t *testing.T, actual error, expected *string) {
+func expectError(t *testing.T, actual error, expected *string) (ok bool) {
t.Helper()
if actual == nil {
if expected != nil {
t.Errorf("expected error %q, got no error\n", *expected)
+ return false
}
} else {
if expected == nil {
t.Errorf("expected no error, got %q\n", actual.Error())
+ return false
} else if *expected != actual.Error() {
t.Errorf("expected error %q, got %q instead\n", *expected, actual.Error())
+ return false
}
}
+
+ return true
}