camper/test/new_invoice_amount.sql

23 lines
693 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 camper, public;
select has_composite('camper', 'new_invoice_amount', 'Composite type camper.new_invoice_amount should exist');
select columns_are('camper', 'new_invoice_amount', array['subtotal', 'taxes', 'total']);
select col_type_is('camper'::name, 'new_invoice_amount'::name, 'subtotal'::name, 'text');
select col_type_is('camper'::name, 'new_invoice_amount'::name, 'taxes'::name, 'text[]');
select col_type_is('camper'::name, 'new_invoice_amount'::name, 'total'::name, 'text');
select *
from finish();
rollback;