diff options
Diffstat (limited to 't/open311.t')
-rw-r--r-- | t/open311.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/open311.t b/t/open311.t index 3bb85f595..85176ff0d 100644 --- a/t/open311.t +++ b/t/open311.t @@ -263,6 +263,22 @@ for my $test ( }; } +subtest 'test always_send_email' => sub { + my $email = $user->email; + $user->email(undef); + 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>', + { always_send_email => 1 } + ); + my $c = CGI::Simple->new( $results->{req}->content ); + + is $c->param('email'), 'do-not-reply@example.org', 'correct email'; + $user->email($email); +}; + sub make_comment { my $cobrand = shift; FixMyStreet::DB->resultset('Comment')->new( { |