Skip to content

Commit

Permalink
fix: resolve handler testing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 27, 2020
1 parent b0f433d commit 4f6bafd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions selfservice/flow/recovery/handler_test.go
Expand Up @@ -147,12 +147,12 @@ func TestGetFlow(t *testing.T) {
}

assertFlowPayload := func(t *testing.T, body []byte) {
assert.Equal(t, "password", gjson.GetBytes(body, "methods.password.method").String(), "%s", body)
assert.NotEmpty(t, gjson.GetBytes(body, "methods.password.config.fields.#(name==csrf_token).value").String(), "%s", body)
assert.Equal(t, "link", gjson.GetBytes(body, "methods.link.method").String(), "%s", body)
assert.NotEmpty(t, gjson.GetBytes(body, "methods.link.config.fields.#(name==csrf_token).value").String(), "%s", body)
assert.NotEmpty(t, gjson.GetBytes(body, "id").String(), "%s", body)
assert.Empty(t, gjson.GetBytes(body, "headers").Value(), "%s", body)
assert.Contains(t, gjson.GetBytes(body, "methods.password.config.action").String(), gjson.GetBytes(body, "id").String(), "%s", body)
assert.Contains(t, gjson.GetBytes(body, "methods.password.config.action").String(), public.URL, "%s", body)
assert.Contains(t, gjson.GetBytes(body, "methods.link.config.action").String(), gjson.GetBytes(body, "id").String(), "%s", body)
assert.Contains(t, gjson.GetBytes(body, "methods.link.config.action").String(), public.URL, "%s", body)
}

assertExpiredPayload := func(t *testing.T, res *http.Response, body []byte) {
Expand Down

0 comments on commit 4f6bafd

Please sign in to comment.