diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-14 22:37:59 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-14 22:40:05 +0700 |
| commit | e7552ad0189f761875bc1c2ca3dd716d43a01e0d (patch) | |
| tree | fd68ec29d23fb9a807a7382088020e3b17d446fd /lib/websocket/server_test.go | |
| parent | 882727d89c8e7f9b9761009ccdca1af8c18d0a30 (diff) | |
| download | pakakeh.go-e7552ad0189f761875bc1c2ca3dd716d43a01e0d.tar.xz | |
all: refactoring the test.Assert and test.AssertBench signature
Previously, the test.Assert and test.AssertBench functions has the
boolean parameter to print the stack trace of test in case its not equal.
Since this parameter is not mandatory and its usually always set to
"true", we remove them from function signature to simplify the call
to Assert and AssertBench.
Diffstat (limited to 'lib/websocket/server_test.go')
| -rw-r--r-- | lib/websocket/server_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/websocket/server_test.go b/lib/websocket/server_test.go index e147b036..b93acedd 100644 --- a/lib/websocket/server_test.go +++ b/lib/websocket/server_test.go @@ -250,7 +250,7 @@ func TestServerHandshake(t *testing.T) { _, err = cl.doHandshake("", bb.Bytes()) if err != nil { - test.Assert(t, "error", c.expError, err.Error(), true) + test.Assert(t, "error", c.expError, err.Error()) } } } @@ -261,6 +261,5 @@ func TestServer_Health(t *testing.T) { t.Fatal(err) } - test.Assert(t, "/status response code", http.StatusOK, - res.StatusCode, true) + test.Assert(t, "/status response code", http.StatusOK, res.StatusCode) } |
