From c149929692fdb1fede3a859c9a8a85f212646456 Mon Sep 17 00:00:00 2001 From: Max Roeleveld Date: Wed, 22 Feb 2017 12:50:23 +0100 Subject: [PATCH] Add unit test for ChannelData.URI() (#43) * Add ID field to User struct Also make sure it's filled in the appropriate places. This allows you to add some granularity to whom can run certain commands. Fixes #39 --- cmd_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd_test.go b/cmd_test.go index e32d164..9593568 100644 --- a/cmd_test.go +++ b/cmd_test.go @@ -289,3 +289,16 @@ func TestMessageReceived(t *testing.T) { }) }) } + +func TestChannelData(t *testing.T) { + Convey("Given a ChannelData struct", t, func() { + Convey("Make sure ChannelData can give you the Channel URI", func() { + cd := ChannelData{ + Protocol: "irc", + Server: "myserver", + Channel: "#mychan", + } + So(cd.URI(), ShouldEqual, "irc://myserver/#mychan") + }) + }) +}