Skip to content

Commit

Permalink
test: ensure aal and amr is set on recovery
Browse files Browse the repository at this point in the history
Closes #1322
  • Loading branch information
aeneasr committed Oct 19, 2021
1 parent cbbcdd2 commit 5cbab54
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions selfservice/strategy/link/strategy_recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"testing"
"time"

"github.com/ory/kratos/session"

"github.com/davecgh/go-spew/spew"

"github.com/gofrs/uuid"
Expand Down Expand Up @@ -361,6 +363,13 @@ func TestRecovery(t *testing.T) {
assert.True(t, addr.Verified)
assert.NotEqual(t, sqlxx.NullTime{}, addr.VerifiedAt)
assert.Equal(t, identity.VerifiableAddressStatusCompleted, addr.Status)

res, err = cl.Get(public.URL + session.RouteWhoami)
require.NoError(t, err)
body = x.MustReadAll(res.Body)
require.NoError(t, res.Body.Close())
assert.Equal(t, "link_recovery", gjson.GetBytes(body, "authentication_methods.0.method").String(), "%s", body)
assert.Equal(t, "aal1", gjson.GetBytes(body, "authenticator_assurance_level").String(), "%s", body)
}

t.Run("type=browser", func(t *testing.T) {
Expand Down

0 comments on commit 5cbab54

Please sign in to comment.