mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-11 23:47:32 +08:00
feat: Add unit test for DeleteGroupMemberHash meth
This commit is contained in:
parent
6b7433352a
commit
0d9390f69b
22
tests/group_test.go
Normal file
22
tests/group_test.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package tests
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestDeleteGroupMemberHash(t *testing.T) {
|
||||||
|
mockGroupDB := new(controller.MockGroupDatabase)
|
||||||
|
|
||||||
|
testGroupMemberHash := "testGroupMemberHash"
|
||||||
|
|
||||||
|
err := mockGroupDB.DeleteGroupMemberHash(testGroupMemberHash)
|
||||||
|
assert.Nil(t, err)
|
||||||
|
|
||||||
|
nonExistentGroupMemberHash := "nonExistentGroupMemberHash"
|
||||||
|
|
||||||
|
err = mockGroupDB.DeleteGroupMemberHash(nonExistentGroupMemberHash)
|
||||||
|
assert.NotNil(t, err)
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user