numerus/test/roles.sql

23 lines
437 B
PL/PgSQL

-- Test roles
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(7);
select has_role('guest');
select has_role('invoicer');
select has_role('admin');
select has_role('authenticator');
select is_member_of('guest', 'authenticator');
select is_member_of('invoicer', 'authenticator');
select is_member_of('admin', 'authenticator');
select *
from finish();
rollback;