/* CREATE EXTENSION IF NOT EXISTS pgtap; */
BEGIN;
SELECT plan(9);

SELECT has_group('dml');
SELECT has_group('ddl');
SELECT has_group('read_only');

SELECT has_user('teamdraft');
SELECT database_privs_are(
    'teamdraft', 'teamdraft', ARRAY['CONNECT', 'TEMPORARY', 'CREATE']
);

SELECT has_user('teamdraft_website');
SELECT database_privs_are(
    'teamdraft', 'teamdraft_website', ARRAY['CONNECT', 'TEMPORARY']
);

SELECT has_user('teamdraft_ro');
SELECT database_privs_are(
    'teamdraft', 'teamdraft_ro', ARRAY['CONNECT', 'TEMPORARY']
);

SELECT * FROM finish();
ROLLBACK;
