numerus/test/invoice_status.sql

36 lines
1.0 KiB
PL/PgSQL

-- Test invoice_status
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(15);
set search_path to numerus, public;
select has_table('invoice_status');
select has_pk('invoice_status' );
select table_privs_are('invoice_status', 'guest', array []::text[]);
select table_privs_are('invoice_status', 'invoicer', array ['SELECT']);
select table_privs_are('invoice_status', 'admin', array ['SELECT']);
select table_privs_are('invoice_status', 'authenticator', array []::text[]);
select has_column('invoice_status', 'invoice_status');
select col_is_pk('invoice_status', 'invoice_status');
select col_type_is('invoice_status', 'invoice_status', 'text');
select col_not_null('invoice_status', 'invoice_status');
select col_hasnt_default('invoice_status', 'invoice_status');
select has_column('invoice_status', 'name');
select col_type_is('invoice_status', 'name', 'text');
select col_not_null('invoice_status', 'name');
select col_hasnt_default('invoice_status', 'name');
select *
from finish();
rollback;