mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
42 lines
798 B
Go
42 lines
798 B
Go
package ivr
|
|
|
|
import "testing"
|
|
|
|
func TestEmoteLookup(t *testing.T) {
|
|
t.Run("returns the channel a twitch emote is from and its tier", func(t *testing.T) {
|
|
// Tier 1
|
|
request, _ := EmoteLookup("forsenE")
|
|
response := "forsenE is a Tier 1 emote to channel forsen."
|
|
|
|
got := request
|
|
want := response
|
|
|
|
if got != want {
|
|
t.Errorf("got %q, want %q", got, want)
|
|
}
|
|
|
|
// Tier 2
|
|
request, _ = EmoteLookup("nanZ")
|
|
response = "nanZ is a Tier 2 emote to channel nani."
|
|
|
|
got = request
|
|
want = response
|
|
|
|
if got != want {
|
|
t.Errorf("got %q, want %q", got, want)
|
|
}
|
|
|
|
// Tier 3
|
|
request, _ = EmoteLookup("pajaCORAL")
|
|
response = "pajaCORAL is a Tier 3 emote to channel pajlada."
|
|
|
|
got = request
|
|
want = response
|
|
|
|
if got != want {
|
|
t.Errorf("got %q, want %q", got, want)
|
|
}
|
|
|
|
})
|
|
}
|