Add GetChannelMember method to plugin API (#7930)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
46f51197fb
Коммит
7a1f81cd52
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user