diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-08 13:49:40 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-08 13:49:40 +0100 |
commit | 0cd38fb6150d66892fb249ab4906df3cbc5bebb7 (patch) | |
tree | e83f67c43f4ede6a3f52efe7a034577fa65ddc77 /t/open311.t | |
parent | 485f739aad7371a0739b42dfb165f9f24882c107 (diff) |
option to only send problem details over open311 for Bromley
Diffstat (limited to 't/open311.t')
-rw-r--r-- | t/open311.t | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/t/open311.t b/t/open311.t index c937d4844..d6a5ef6f6 100644 --- a/t/open311.t +++ b/t/open311.t @@ -91,10 +91,32 @@ EOT is $c->param('last_name'), 'User', 'correct last name'; is $c->param('lat'), 1, 'latitide correct'; is $c->param('long'), 2, 'longitude correct'; - is $c->param('description'), $description, 'descritpion correct'; + is $c->param('description'), $description, 'description correct'; is $c->param('service_code'), 'pothole', 'service code correct'; }; +subtest 'posting service request with basic_description' => sub { + my $extra = { + url => 'http://example.com/report/1', + }; + + my $results = make_service_req( + $problem, + $extra, + $problem->category, + '<?xml version="1.0" encoding="utf-8"?><service_requests><request><service_request_id>248</service_request_id></request></service_requests>', + { basic_description => 1 }, + ); + + is $results->{ res }, 248, 'got request id'; + + my $req = $o->test_req_used; + + my $c = CGI::Simple->new( $results->{ req }->content ); + + is $c->param('description'), $problem->detail, 'description correct'; +}; + for my $test ( { desc => 'extra values in service request', |