diff options
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', |