diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-06-15 20:14:51 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-06 12:58:57 +0100 |
commit | 9d8ae07980bccd58e11acbc82e60b651ed20c181 (patch) | |
tree | ccfa198d3ec4bc0a0d903b8c59d89efa32c3ccc7 /t/cobrand | |
parent | f0911da291b55801e69132a4d6f0a312089fdc18 (diff) |
Improve CSRF tokens and add to more forms.
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/zurich.t | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index cf66136e5..a595f48c9 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -810,17 +810,12 @@ subtest "photo must be supplied for categories that require it" => sub { MAPIT_ID_WHITELIST => [ 423017 ], MAP_TYPE => 'Zurich,OSM', }, sub { - $mech->post_ok( '/report/new', { + $mech->get_ok('/report/new?lat=47.381817&lon=8.529156'); + $mech->submit_form_ok({ with_fields => { detail => 'Problem-Bericht', - lat => 47.381817, - lon => 8.529156, email => 'user@example.org', - pc => '', - name => '', category => 'Graffiti - photo required', - photo => '', - submit_problem => 1, - }); + }}); is $mech->res->code, 200, "missing photo shouldn't return anything but 200"; $mech->content_contains(_("Photo is required."), 'response should contain photo error message'); }; |