Skip to content
Snippets Groups Projects
Commit 7908c1a2 authored by Jonah Husson's avatar Jonah Husson
Browse files

update search test

parent f6bf5a61
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import (
"gitlab.com/elixxir/client/switchboard"
"gitlab.com/elixxir/client/ud"
"gitlab.com/elixxir/crypto/e2e"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/elixxir/user-discovery-bot/storage"
"gitlab.com/xx_network/primitives/id"
"testing"
......@@ -105,4 +106,17 @@ func TestManager_handleSearch(t *testing.T) {
if len(resp.Contacts) != 1 {
t.Errorf("Did not receive expected number of contacts")
}
resp = manager.handleSearch(&ud.SearchSend{
Fact: []*ud.HashFact{
{
Hash: fid,
Type: int32(fact.Nickname),
},
},
CommID: 0,
}, id.NewIdFromString("zezima", id.User, t))
if len(resp.Contacts) != 0 {
t.Errorf("Should not be able to search with nickname")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment