[open-ils-commits] [GIT] Evergreen ILS branch master updated. 066232c2fcda409c43aa9d4a2230fc9cb73f6af5

Evergreen Git git at git.evergreen-ils.org
Wed Nov 11 22:04:03 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  066232c2fcda409c43aa9d4a2230fc9cb73f6af5 (commit)
      from  52fa86a503649f1971dda2faf638a8b183bd6f6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 066232c2fcda409c43aa9d4a2230fc9cb73f6af5
Author: Yamil Suarez <yamil at yamil.com>
Date:   Fri Aug 14 15:39:58 2015 -0400

    LP# 1483506 public.first_agg & public.first pgTAP tests
    
    Signed-off-by: Yamil Suarez <yamil at yamil.com>
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/t/public.first.pg b/Open-ILS/src/sql/Pg/t/public.first.pg
new file mode 100644
index 0000000..31941b3
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/public.first.pg
@@ -0,0 +1,22 @@
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests. 
+SELECT is(
+    (SELECT public.first(name) FROM config.copy_status WHERE id in (1,2,3)) ,
+    (SELECT name FROM config.copy_status WHERE id = 1),
+    'testing having three rows; picking first row'
+);
+
+SELECT is(
+    (SELECT public.first(name) FROM config.copy_status WHERE id = 1) ,
+    (SELECT name FROM config.copy_status WHERE id = 1),
+    'testing having one row; picking first row'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
\ No newline at end of file
diff --git a/Open-ILS/src/sql/Pg/t/public.first_agg.pg b/Open-ILS/src/sql/Pg/t/public.first_agg.pg
new file mode 100644
index 0000000..0dc826b
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/public.first_agg.pg
@@ -0,0 +1,22 @@
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests. 
+SELECT is(
+    public.first_agg(1,2),
+    1,
+    'testing having two interger parameters; picking first parameter'
+);
+
+SELECT is(
+    public.first_agg('1'::text,'2'::text),
+    '1',
+    'testing having two string parameters; picking first parameter'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/t/public.first.pg     |   22 ++++++++++++++++++++++
 Open-ILS/src/sql/Pg/t/public.first_agg.pg |   22 ++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/t/public.first.pg
 create mode 100644 Open-ILS/src/sql/Pg/t/public.first_agg.pg


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list