numerus/test/update_expense_payment_stat...

27 lines
1.3 KiB
PL/PgSQL

-- Test update_expense_payment_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_expense_payment_status', array['integer', 'integer', 'integer']);
select function_lang_is('numerus', 'update_expense_payment_status', array['integer', 'integer', 'integer'], 'sql');
select function_returns('numerus', 'update_expense_payment_status', array['integer', 'integer', 'integer'], 'void');
select isnt_definer('numerus', 'update_expense_payment_status', array['integer', 'integer', 'integer']);
select volatility_is('numerus', 'update_expense_payment_status', array['integer', 'integer', 'integer'], 'volatile');
select function_privs_are('numerus', 'update_expense_payment_status', array ['integer', 'integer', 'integer'], 'guest', array []::text[]);
select function_privs_are('numerus', 'update_expense_payment_status', array ['integer', 'integer', 'integer'], 'invoicer', array ['EXECUTE']);
select function_privs_are('numerus', 'update_expense_payment_status', array ['integer', 'integer', 'integer'], 'admin', array ['EXECUTE']);
select function_privs_are('numerus', 'update_expense_payment_status', array ['integer', 'integer', 'integer'], 'authenticator', array []::text[]);
select *
from finish();
rollback;