Skip to content

Commit

Permalink
fix: update test to use jsonb
Browse files Browse the repository at this point in the history
  • Loading branch information
joel authored and joel committed Feb 17, 2024
1 parent 7948bd9 commit 8d605be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/api/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,19 +605,19 @@ func (ts *TokenTestSuite) TestPasswordVerificationHook() {
uri: "pg-functions://postgres/auth/password_verification_hook",
hookFunctionSQL: `
create or replace function password_verification_hook(input jsonb)
returns json as $$
returns jsonb as $$
begin
return json_build_object('decision', 'continue');
return jsonb_build_object('decision', 'continue');
end; $$ language plpgsql;`,
expectedCode: http.StatusOK,
}, {
desc: "Reject- Enabled",
uri: "pg-functions://postgres/auth/password_verification_hook_reject",
hookFunctionSQL: `
create or replace function password_verification_hook_reject(input jsonb)
returns json as $$
returns jsonb as $$
begin
return json_build_object('decision', 'reject');
return jsonb_build_object('decision', 'reject', 'message', 'You shall not pass!');
end; $$ language plpgsql;`,
expectedCode: http.StatusForbidden,
},
Expand Down

0 comments on commit 8d605be

Please sign in to comment.