Skip to content

Commit

Permalink
Merge pull request #13 from passageidentity/users/db/ch1156-create-up…
Browse files Browse the repository at this point in the history
…date-user-metadata

tests now working
  • Loading branch information
dylanbrookes authored Apr 29, 2022
2 parents d9d2d54 + d0fd7ee commit 679e812
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions user_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package passage_test

import (
"fmt"
"testing"

"github.com/passageidentity/passage-go"
Expand Down Expand Up @@ -125,16 +126,16 @@ func TestCreateUserWithMetadata(t *testing.T) {
require.Nil(t, err)

createUserBody := passage.CreateUserBody{
Email: RandomEmail,
Email: fmt.Sprintf("1%v", RandomEmail),
UserMetadata: map[string]interface{}{
"example1": "test",
},
}

user, err := psg.CreateUser(createUserBody)
require.Nil(t, err)
assert.Equal(t, RandomEmail, user.Email)
assert.Equal(t, "test", user.UserMetadata["example1"])
assert.Equal(t, "1"+RandomEmail, user.Email)
assert.Equal(t, "test", user.UserMetadata["example1"].(string))

CreatedUser = *user
}
Expand Down

0 comments on commit 679e812

Please sign in to comment.