mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
testing removing contact from channel
This commit is contained in:
parent
9b5dcdfe3f
commit
98f3d2c87c
@ -252,5 +252,27 @@ func TestMessangerApp(t *testing.T) {
|
||||
return false
|
||||
}))
|
||||
|
||||
// unshare channel with A
|
||||
params = &TestApiParams{
|
||||
restType: "DELETE",
|
||||
query: "/content/channels/{channelId}/cards/{cardId}",
|
||||
path: map[string]string{ "cardId": set.B.A.CardId, "channelId": channel.Id },
|
||||
tokenType: APP_TOKENAPP,
|
||||
token: set.B.Token,
|
||||
}
|
||||
response = &TestApiResponse{}
|
||||
assert.NoError(t, TestApiRequest(ClearChannelCard, params, response))
|
||||
|
||||
// wait for test
|
||||
assert.NoError(t, app.WaitFor(func(testApp *TestApp)bool {
|
||||
contact, contactSet := testApp.contacts[set.A.B.CardId]
|
||||
if contactSet {
|
||||
_, channelSet := contact.channels[channel.Id]
|
||||
if !channelSet {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user