1
0
mirror of https://github.com/velour/catbase.git synced 2025-04-03 19:51:42 +00:00
catbase/bot/msglog/msglog_test.go
Chris Sexton e449a82001 YOLO: DEAL WITH IT
Refactored a bunch of junk.
2016-04-01 10:20:26 -04:00

29 lines
539 B
Go

// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors.
package msglog
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/velour/catbase/bot/msg"
)
func TestNew(t *testing.T) {
in := make(chan msg.Message)
out := make(chan msg.Messages)
logger := New(in, out)
assert.NotNil(t, logger)
}
func TestRunNew(t *testing.T) {
in := make(chan msg.Message)
out := make(chan msg.Messages)
RunNew(in, out)
in <- msg.Message{}
msg := <-out
assert.Empty(t, out)
assert.NotNil(t, msg)
}