28 lines
1.3 KiB
MySQL
28 lines
1.3 KiB
MySQL
|
-- Test edited_invoice_product
|
||
|
set client_min_messages to warning;
|
||
|
create extension if not exists pgtap;
|
||
|
reset client_min_messages;
|
||
|
|
||
|
begin;
|
||
|
|
||
|
select plan(10);
|
||
|
|
||
|
set search_path to camper, public;
|
||
|
|
||
|
select has_composite('camper', 'edited_invoice_product', 'Composite type camper.edited_invoice_product should exist');
|
||
|
select columns_are('camper', 'edited_invoice_product', array['invoice_product_id', 'product_id', 'name', 'description', 'price', 'quantity', 'discount_rate', 'tax']);
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'invoice_product_id'::name, 'integer');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'product_id'::name, 'integer');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'name'::name, 'text');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'description'::name, 'text');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'price'::name, 'text');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'quantity'::name, 'integer');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'discount_rate'::name, 'discount_rate');
|
||
|
select col_type_is('camper'::name, 'edited_invoice_product'::name, 'tax'::name, 'integer[]');
|
||
|
|
||
|
|
||
|
select *
|
||
|
from finish();
|
||
|
|
||
|
rollback;
|