add test of asset.copy_state()
authorGalen Charlton <gmc@esilibrary.com>
Fri, 2 Sep 2016 20:40:29 +0000 (16:40 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 27 Mar 2017 20:29:19 +0000 (16:29 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/live_t/copy_state.pg [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/live_t/copy_state.pg b/Open-ILS/src/sql/Pg/live_t/copy_state.pg
new file mode 100644 (file)
index 0000000..e09e62b
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN;
+
+SELECT plan(1);
+
+\set copy_id 245
+
+UPDATE asset.copy SET status = 4 WHERE id = :copy_id;
+
+SELECT is(asset.copy_state(:copy_id), 'MISSING', 'asset.copy_state detects missing state');
+
+ROLLBACK;