TestWithLocalpartOnly checks that localpart is returned when usernameParam contains only localpart.
(t *testing.T)
| 41 | |
| 42 | // TestWithLocalpartOnly checks that localpart is returned when usernameParam contains only localpart. |
| 43 | func TestWithLocalpartOnly(t *testing.T) { |
| 44 | lp, err := ParseUsernameParam(localpart, &serverName) |
| 45 | |
| 46 | if err != nil { |
| 47 | t.Error("User ID Parsing failed for ", localpart, " with error: ", err.Error()) |
| 48 | } |
| 49 | |
| 50 | if lp != localpart { |
| 51 | t.Error("Incorrect username, returned: ", lp, " should be: ", localpart) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // TestIncorrectDomain checks for error when there's server name mismatch. |
| 56 | func TestIncorrectDomain(t *testing.T) { |
nothing calls this directly
no test coverage detected