aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-03-14 22:37:59 +0700
committerShulhan <ms@kilabit.info>2021-03-14 22:40:05 +0700
commite7552ad0189f761875bc1c2ca3dd716d43a01e0d (patch)
treefd68ec29d23fb9a807a7382088020e3b17d446fd /api
parent882727d89c8e7f9b9761009ccdca1af8c18d0a30 (diff)
downloadpakakeh.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 'api')
-rw-r--r--api/telegram/bot/command_test.go2
-rw-r--r--api/telegram/bot/message_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/api/telegram/bot/command_test.go b/api/telegram/bot/command_test.go
index 79bc5e34..d0fdab01 100644
--- a/api/telegram/bot/command_test.go
+++ b/api/telegram/bot/command_test.go
@@ -67,6 +67,6 @@ func TestCommand_validate(t *testing.T) {
}}
for _, c := range cases {
- test.Assert(t, c.desc, c.exp, c.cmd.validate(), true)
+ test.Assert(t, c.desc, c.exp, c.cmd.validate())
}
}
diff --git a/api/telegram/bot/message_test.go b/api/telegram/bot/message_test.go
index a1319839..b676a233 100644
--- a/api/telegram/bot/message_test.go
+++ b/api/telegram/bot/message_test.go
@@ -52,7 +52,7 @@ func TestMessage_parseCommandArgs(t *testing.T) {
for _, c := range cases {
c.msg.parseCommandArgs()
- test.Assert(t, "Command", c.expCommand, c.msg.Command, true)
- test.Assert(t, "CommandArgs", c.expArgs, c.msg.CommandArgs, true)
+ test.Assert(t, "Command", c.expCommand, c.msg.Command)
+ test.Assert(t, "CommandArgs", c.expArgs, c.msg.CommandArgs)
}
}