numerus/test/new_invoice_amount.sql

23 lines
700 B
PL/PgSQL

-- Test new_invoice_amount
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(5);
set search_path to numerus, public;
select has_composite('numerus', 'new_invoice_amount', 'Composite type numerus.new_invoice_amount should exist');
select columns_are('numerus', 'new_invoice_amount', array['subtotal', 'taxes', 'total']);
select col_type_is('numerus'::name, 'new_invoice_amount'::name, 'subtotal'::name, 'text');
select col_type_is('numerus'::name, 'new_invoice_amount'::name, 'taxes'::name, 'text[]');
select col_type_is('numerus'::name, 'new_invoice_amount'::name, 'total'::name, 'text');
select *
from finish();
rollback;