diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-16 14:58:33 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-03-16 11:58:33 -0700 |
commit | d757645c2490dd4f0de16cc32e05551b1476d0a0 (patch) | |
tree | 5d6e4049aa296b7629a34ca5b02d0aba25dd27dc /model/channel_member_test.go | |
parent | 04c0223c6402b12e67c61474ae310b0a56af6482 (diff) | |
download | chat-d757645c2490dd4f0de16cc32e05551b1476d0a0.tar.gz chat-d757645c2490dd4f0de16cc32e05551b1476d0a0.tar.bz2 chat-d757645c2490dd4f0de16cc32e05551b1476d0a0.zip |
Implement some channel endpoints for APIv4 (#5767)
Diffstat (limited to 'model/channel_member_test.go')
-rw-r--r-- | model/channel_member_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/model/channel_member_test.go b/model/channel_member_test.go index e43560cee..6fb666300 100644 --- a/model/channel_member_test.go +++ b/model/channel_member_test.go @@ -69,3 +69,17 @@ func TestChannelMemberIsValid(t *testing.T) { t.Fatal(err) } } + +func TestChannelUnreadJson(t *testing.T) { + o := ChannelUnread{ChannelId: NewId(), TeamId: NewId(), MsgCount: 5, MentionCount: 3} + json := o.ToJson() + ro := ChannelUnreadFromJson(strings.NewReader(json)) + + if o.TeamId != ro.TeamId { + t.Fatal("Team Ids do not match") + } + + if o.MentionCount != ro.MentionCount { + t.Fatal("MentionCount do not match") + } +} |