add tests for fistline and followage

This commit is contained in:
lyx0 2021-10-28 22:37:58 +02:00
parent 36d36b4942
commit fb84ff2d20
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package ivr
import "testing"
func TestFirstLine(t *testing.T) {
t.Run("returns a users first message in a channel", func(t *testing.T) {
request, _ := FirstLine("forsen", "forsen")
response := "forsen: EZ or Ezy (3y, 9mo, 16d ago)."
got := request
want := response
if got != want {
t.Errorf("got %q, want %q", got, want)
}
})
}

View file

@ -0,0 +1,18 @@
package ivr
import "testing"
func TestFollowage(t *testing.T) {
t.Run("returns a users date they followed a channel", func(t *testing.T) {
request, _ := Followage("forsen", "pajlada")
response := "pajlada has been following forsen since 2015-03-09."
got := request
want := response
if got != want {
t.Errorf("got %q, want %q", got, want)
}
})
}