MCPcopy Create free account
hub / github.com/daodst/chat / TestIncorrectDomain

Function TestIncorrectDomain

clientapi/userutil/userutil_test.go:56–62  ·  view source on GitHub ↗

TestIncorrectDomain checks for error when there's server name mismatch.

(t *testing.T)

Source from the content-addressed store, hash-verified

54
55// TestIncorrectDomain checks for error when there's server name mismatch.
56func TestIncorrectDomain(t *testing.T) {
57 _, err := ParseUsernameParam(goodUserID, &invalidServerName)
58
59 if err == nil {
60 t.Error("Invalid Domain should return an error")
61 }
62}
63
64// TestBadUserID checks that ParseUsernameParam fails for invalid user ID
65func TestBadUserID(t *testing.T) {

Callers

nothing calls this directly

Calls 2

ParseUsernameParamFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected