-
Notifications
You must be signed in to change notification settings - Fork 977
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ajay Kelkar
committed
Feb 10, 2023
1 parent
bd92f2f
commit 8166ba1
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,10 +117,6 @@ func TestHandler(t *testing.T) { | |
} | ||
}) | ||
|
||
t.Run("case=should return 404 on a non-existing resource for identity lookup", func(t *testing.T) { | ||
_ = get(t, adminTS, "/identities?identifier=does-not-exist", http.StatusNotFound) | ||
}) | ||
|
||
t.Run("case=should fail to create an identity because schema id does not exist", func(t *testing.T) { | ||
for name, ts := range map[string]*httptest.Server{"public": publicTS, "admin": adminTS} { | ||
t.Run("endpoint="+name, func(t *testing.T) { | ||
|
@@ -379,6 +375,11 @@ func TestHandler(t *testing.T) { | |
} | ||
}) | ||
|
||
t.Run("case=should return an empty array on a failed lookup with identifier", func(t *testing.T) { | ||
res := get(t, adminTS, "/[email protected]", http.StatusOK) | ||
assert.EqualValues(t, int64(0), res.Get("#").Int(), "%s", res.Raw) | ||
}) | ||
|
||
t.Run("case=should be able to lookup the identity using identifier", func(t *testing.T) { | ||
i1 := &identity.Identity{ | ||
Credentials: map[identity.CredentialsType]identity.Credentials{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters