aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311/endpoint/Endpoint_Warwick.pm
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2014-07-15 14:15:46 +0000
committerHakim Cassimally <hakim@mysociety.org>2014-10-16 16:56:27 +0000
commit56eab366fc60fe83024abb6819c146bc9bd47adc (patch)
treea12aa26e01855c297ebcaf6232319f3e41b1e669 /t/open311/endpoint/Endpoint_Warwick.pm
parentf47e9d48a2d26e92723ae96d3d65a1ba005f426f (diff)
Open311 Warwick (Exor) Integration
::Integration::Warwick subclasses ::Integration::Exor refactor request_class and new_request Exor service Warwickshire updates retrieval, with datetimes stubbing out of Oracle constants, for local testing We also edit FMS's core PopulateServiceList routine to hide system fields from FMS: Bromley/Warwickshire send metadata in their services/FOO.xml advising that you can pass, e.g. attributes[easting]. FMS by default shows all of these to the user to fill in, however we don't *want* the user to supply these, rather they are added by the cobrand. Bromley had an exception for this (keyed by $body->areas->id). We write this more generally for Warwickshire too, keying instead by $body->name (as this is far less likely to be overridden for installs using global or custom Mapit's)
Diffstat (limited to 't/open311/endpoint/Endpoint_Warwick.pm')
-rw-r--r--t/open311/endpoint/Endpoint_Warwick.pm36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/open311/endpoint/Endpoint_Warwick.pm b/t/open311/endpoint/Endpoint_Warwick.pm
new file mode 100644
index 000000000..f4710f63b
--- /dev/null
+++ b/t/open311/endpoint/Endpoint_Warwick.pm
@@ -0,0 +1,36 @@
+package t::open311::endpoint::Endpoint_Warwick;
+use Web::Simple;
+
+use Module::Loaded;
+BEGIN {
+ mark_as_loaded('DBD::Oracle');
+}
+
+our %BINDINGS;
+our $UPDATES_SQL;
+
+extends 'Open311::Endpoint::Integration::Warwick';
+
+sub insert_into_db {
+ my ($self, $bindings) = @_;
+
+ %BINDINGS = %$bindings;
+ # return ($pem_id, $error_value, $error_product);
+ return (1001);
+}
+
+sub get_updates_from_sql {
+ my ($self, $sql) = @_;
+ $UPDATES_SQL = $sql;
+ return (
+ {
+ row_id => 999,
+ service_request_id => 1001,
+ updated_datetime => '2014-07-23 11:07:00',
+ status => 'closed',
+ description => 'Closed the ticket',
+ }
+ );
+}
+
+1;