From c23f145ddc73b180adc41fc31d386c6ddfde7844 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 13 Jul 2015 15:19:35 -0400 Subject: [PATCH] LP#1474051 PGTAP test checking dropped columns Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- Open-ILS/src/sql/Pg/t/lp1474051-drop-cc-columns.pg | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/t/lp1474051-drop-cc-columns.pg diff --git a/Open-ILS/src/sql/Pg/t/lp1474051-drop-cc-columns.pg b/Open-ILS/src/sql/Pg/t/lp1474051-drop-cc-columns.pg new file mode 100644 index 0000000000..93142379ff --- /dev/null +++ b/Open-ILS/src/sql/Pg/t/lp1474051-drop-cc-columns.pg @@ -0,0 +1,26 @@ +-- Load the TAP functions. +BEGIN; + +-- Plan the tests. +SELECT plan(6); + +-- Run the tests. + +SELECT hasnt_column('money', 'credit_card_payment', 'cc_type', + 'Column "cc_type" on money.credit_card_payment should not exist'); +SELECT hasnt_column('money', 'credit_card_payment', 'expire_month', + 'Column "expire_month" on money.credit_card_payment should not exist'); +SELECT hasnt_column('money', 'credit_card_payment', 'expire_year', + 'Column "expire_year" on money.credit_card_payment should not exist'); +SELECT hasnt_column('money', 'credit_card_payment', 'cc_first_name', + 'Column "cc_first_name" on money.credit_card_payment should not exist'); +SELECT hasnt_column('money', 'credit_card_payment', 'cc_last_name', + 'Column "cc_last_name" on money.credit_card_payment should not exist'); + +-- make sure at least one column does exist +SELECT has_column('money', 'credit_card_payment', 'approval_code', + 'Column "approval_code" on money.credit_card_payment should exist'); + +-- Finish the tests and clean up. +SELECT * FROM finish(); +ROLLBACK; -- 2.11.0