summaryrefslogtreecommitdiffstats
path: root/plugin/rpcplugin/api_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/rpcplugin/api_test.go')
-rw-r--r--plugin/rpcplugin/api_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/rpcplugin/api_test.go b/plugin/rpcplugin/api_test.go
index 0c7321162..8a36ef4f6 100644
--- a/plugin/rpcplugin/api_test.go
+++ b/plugin/rpcplugin/api_test.go
@@ -54,6 +54,11 @@ func TestAPI(t *testing.T) {
Id: "thechannelid",
}
+ testChannelMember := &model.ChannelMember{
+ ChannelId: "thechannelid",
+ UserId: "theuserid",
+ }
+
testTeam := &model.Team{
Id: "theteamid",
}
@@ -111,6 +116,11 @@ func TestAPI(t *testing.T) {
assert.Equal(t, testChannel, channel)
assert.Nil(t, err)
+ api.On("GetChannelMember", "thechannelid", "theuserid").Return(testChannelMember, nil).Once()
+ member, err := remote.GetChannelMember("thechannelid", "theuserid")
+ assert.Equal(t, testChannelMember, member)
+ assert.Nil(t, err)
+
api.On("CreateUser", mock.AnythingOfType("*model.User")).Return(func(u *model.User) (*model.User, *model.AppError) {
u.Id = "theuserid"
return u, nil