numerus/test/quote_status.sql

36 lines
1.0 KiB
PL/PgSQL

-- Test quote_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('quote_status');
select has_pk('quote_status' );
select table_privs_are('quote_status', 'guest', array []::text[]);
select table_privs_are('quote_status', 'invoicer', array ['SELECT']);
select table_privs_are('quote_status', 'admin', array ['SELECT']);
select table_privs_are('quote_status', 'authenticator', array []::text[]);
select has_column('quote_status', 'quote_status');
select col_is_pk('quote_status', 'quote_status');
select col_type_is('quote_status', 'quote_status', 'text');
select col_not_null('quote_status', 'quote_status');
select col_hasnt_default('quote_status', 'quote_status');
select has_column('quote_status', 'name');
select col_type_is('quote_status', 'name', 'text');
select col_not_null('quote_status', 'name');
select col_hasnt_default('quote_status', 'name');
select *
from finish();
rollback;