Check if new account ID is already being used (#364)

This commit is contained in:
Maycon Santos
2022-06-20 18:20:43 +02:00
committed by GitHub
parent 35c7cae267
commit f9f2d7c7ef
5 changed files with 49 additions and 15 deletions

View File

@ -33,7 +33,7 @@ func TestNewStore(t *testing.T) {
func TestSaveAccount(t *testing.T) {
store := newStore(t)
account := NewAccount("testuser", "")
account := newAccountWithId("account_id", "testuser", "")
setupKey := GenerateDefaultSetupKey()
account.SetupKeys[setupKey.Key] = setupKey
account.Peers["testpeer"] = &Peer{
@ -72,7 +72,7 @@ func TestSaveAccount(t *testing.T) {
func TestStore(t *testing.T) {
store := newStore(t)
account := NewAccount("testuser", "")
account := newAccountWithId("account_id", "testuser", "")
account.Peers["testpeer"] = &Peer{
Key: "peerkey",
SetupKey: "peerkeysetupkey",