MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestError

Function TestError

base/error_test.go:27–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestError(t *testing.T) {
28 message := "Sync Gateway is not listening on 4984!"
29 sgError := sgError{message: message}
30 assert.Equal(t, message, sgError.Error())
31
32 message = "Unknown error"
33 sgError.message = ""
34 assert.Equal(t, message, sgError.Error())
35}
36
37func TestErrorAsHTTPStatus(t *testing.T) {
38 code, text := ErrorAsHTTPStatus(nil)

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.95
EqualMethod · 0.45

Tested by

no test coverage detected