-- Test new_quote_product
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_composite('numerus', 'new_quote_product', 'Composite type numerus.new_quote_product should exist');
select columns_are('numerus', 'new_quote_product', array['product_id', 'name', 'description', 'price', 'quantity', 'discount_rate', 'tax']);
select col_type_is('numerus'::name, 'new_quote_product'::name, 'product_id'::name, 'integer');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'name'::name, 'text');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'description'::name, 'text');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'price'::name, 'text');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'quantity'::name, 'integer');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'discount_rate'::name, 'discount_rate');
select col_type_is('numerus'::name, 'new_quote_product'::name, 'tax'::name, 'integer[]');

select *
from finish();

rollback;