Skip to content
Snippets Groups Projects
Commit 78169199 authored by farhaven's avatar farhaven
Browse files

More test coverage

parent e9fe67fc
No related branches found
No related tags found
No related merge requests found
package main
import (
"strings"
"testing"
)
func TestSimpleHelp(t *testing.T) {
h := getHelp()
if !strings.Contains(h, owner) {
t.Errorf(`Simple help does not contain bot owner!`)
}
}
func TestFullHelp(t *testing.T) {
h := getFullHelp()
if len(h) != 5 {
t.Log(`unexpected number of output lines:`, len(h))
t.FailNow()
}
if !strings.Contains(h[3], version) {
t.Errorf(`full help does not contain version!`)
}
if !strings.Contains(h[4], owner) {
t.Errorf(`Simple help does not contain bot owner!`)
}
}
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment