numerus/test/update_invoice_collection_s...

28 lines
1.4 KiB
PL/PgSQL

-- Test update_invoice_collection_status
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(9);
set search_path to numerus, public;
select has_function('numerus', 'update_invoice_collection_status', array['integer', 'integer', 'integer']);
select function_lang_is('numerus', 'update_invoice_collection_status', array['integer', 'integer', 'integer'], 'sql');
select function_returns('numerus', 'update_invoice_collection_status', array['integer', 'integer', 'integer'], 'void');
select isnt_definer('numerus', 'update_invoice_collection_status', array['integer', 'integer', 'integer']);
select volatility_is('numerus', 'update_invoice_collection_status', array['integer', 'integer', 'integer'], 'volatile');
select function_privs_are('numerus', 'update_invoice_collection_status', array ['integer', 'integer', 'integer'], 'guest', array []::text[]);
select function_privs_are('numerus', 'update_invoice_collection_status', array ['integer', 'integer', 'integer'], 'invoicer', array ['EXECUTE']);
select function_privs_are('numerus', 'update_invoice_collection_status', array ['integer', 'integer', 'integer'], 'admin', array ['EXECUTE']);
select function_privs_are('numerus', 'update_invoice_collection_status', array ['integer', 'integer', 'integer'], 'authenticator', array []::text[]);
select *
from finish();
rollback;