29 lines
1.3 KiB
PL/PgSQL
29 lines
1.3 KiB
PL/PgSQL
-- Test redsys_request
|
|
set client_min_messages to warning;
|
|
create extension if not exists pgtap;
|
|
reset client_min_messages;
|
|
|
|
begin;
|
|
|
|
select plan(11);
|
|
|
|
set search_path to camper, public;
|
|
|
|
select has_composite('camper', 'redsys_request', 'Composite type camper.redsys_request should exist');
|
|
select columns_are('camper', 'redsys_request', array['transaction_type', 'amount', 'order_number', 'product', 'card_holder', 'success_uri', 'failure_uri', 'notification_uri', 'lang_tag']);
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'transaction_type'::name, 'integer');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'amount'::name, 'text');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'order_number'::name, 'text');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'product'::name, 'text');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'card_holder'::name, 'text');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'success_uri'::name, 'uri');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'failure_uri'::name, 'uri');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'notification_uri'::name, 'uri');
|
|
select col_type_is('camper'::name, 'redsys_request'::name, 'lang_tag'::name, 'text');
|
|
|
|
|
|
select *
|
|
from finish();
|
|
|
|
rollback;
|