summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-01-19 09:00:13 -0500
committerGitHub <noreply@github.com>2017-01-19 09:00:13 -0500
commitd3a285e64d051aa8d5c4c9854597dfbcce107675 (patch)
treee16ca3d52b6347a754e506aa8cac7457c62d3639 /store/sql_channel_store_test.go
parent61b7226533568f3261fc233538ce998bb71a5345 (diff)
downloadchat-d3a285e64d051aa8d5c4c9854597dfbcce107675.tar.gz
chat-d3a285e64d051aa8d5c4c9854597dfbcce107675.tar.bz2
chat-d3a285e64d051aa8d5c4c9854597dfbcce107675.zip
Migrate functions to app package (#5106)
* Refactor and move session logic into app package * Refactor email functions into the app package * Refactor password update into app package * Migrate user functions to app package * Move team functions into app package * Migrate channel functions into app package * Pass SiteURL through to app functions * Update based on feedback
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r--store/sql_channel_store_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go
index 6186a242c..38446bf94 100644
--- a/store/sql_channel_store_test.go
+++ b/store/sql_channel_store_test.go
@@ -446,7 +446,7 @@ func TestChannelMemberStore(t *testing.T) {
t.Fatal("Member update time incorrect on delete")
}
- member := (<-store.Channel().GetMember(o1.ChannelId, o1.UserId)).Data.(model.ChannelMember)
+ member := (<-store.Channel().GetMember(o1.ChannelId, o1.UserId)).Data.(*model.ChannelMember)
if member.ChannelId != o1.ChannelId {
t.Fatal("should have go member")
}
@@ -918,7 +918,7 @@ func TestGetMember(t *testing.T) {
if result := <-store.Channel().GetMember(c1.Id, userId); result.Err != nil {
t.Fatal("shouldn't have errored when getting member", result.Err)
- } else if member := result.Data.(model.ChannelMember); member.ChannelId != c1.Id {
+ } else if member := result.Data.(*model.ChannelMember); member.ChannelId != c1.Id {
t.Fatal("should've gotten member of channel 1")
} else if member.UserId != userId {
t.Fatal("should've gotten member for user")
@@ -926,7 +926,7 @@ func TestGetMember(t *testing.T) {
if result := <-store.Channel().GetMember(c2.Id, userId); result.Err != nil {
t.Fatal("shouldn't have errored when getting member", result.Err)
- } else if member := result.Data.(model.ChannelMember); member.ChannelId != c2.Id {
+ } else if member := result.Data.(*model.ChannelMember); member.ChannelId != c2.Id {
t.Fatal("should've gotten member of channel 2")
} else if member.UserId != userId {
t.Fatal("should've gotten member for user")
@@ -1313,7 +1313,7 @@ func TestChannelStoreGetMembersByIds(t *testing.T) {
if r := <-store.Channel().GetMembersByIds(m1.ChannelId, []string{m1.UserId}); r.Err != nil {
t.Fatal(r.Err)
} else {
- rm1 := r.Data.(model.ChannelMembers)[0]
+ rm1 := (*r.Data.(*model.ChannelMembers))[0]
if rm1.ChannelId != m1.ChannelId {
t.Fatal("bad team id")
@@ -1330,7 +1330,7 @@ func TestChannelStoreGetMembersByIds(t *testing.T) {
if r := <-store.Channel().GetMembersByIds(m1.ChannelId, []string{m1.UserId, m2.UserId, model.NewId()}); r.Err != nil {
t.Fatal(r.Err)
} else {
- rm := r.Data.(model.ChannelMembers)
+ rm := (*r.Data.(*model.ChannelMembers))
if len(rm) != 2 {
t.Fatal("return wrong number of results")