diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-01-27 18:32:02 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:22 +0100 |
commit | a78bb3fc98dd1851e371c78d9743125d02baf04e (patch) | |
tree | be8bb660db9c982ac6b0b2add70a82acc01f30b9 /t/app/controller/moderate.t | |
parent | ccc71f8f2d4a514f6ffaab2f3bbc76ea423f212b (diff) |
Add support for multiple photos per report.
For Zurich, see mysociety/FixMyStreet-Commercial#664.
This commit includes a new PhotoSet class (NB: called Model:: though not
really a model), should handle binary data (e.g. old style photos in
database), fileids (40-char hash), and Catalyst::Upload objects.
Diffstat (limited to 't/app/controller/moderate.t')
-rw-r--r-- | t/app/controller/moderate.t | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/t/app/controller/moderate.t b/t/app/controller/moderate.t index cd4c742bb..b79f50e73 100644 --- a/t/app/controller/moderate.t +++ b/t/app/controller/moderate.t @@ -42,10 +42,7 @@ sub create_report { latitude => '51.4129', longitude => '0.007831', user_id => $user->id, - photo => 'DUMMY DATA', # this obv fake data would not be - # accepted by front-end but is - # enough to trigger "I have a - # photo" behaviour + photo => $mech->get_photo_data, }); } my $report = create_report(); @@ -216,7 +213,7 @@ sub create_update { user => $user, name => 'Test User', anonymous => 'f', - photo => 'DUMMY DATA', # as above + photo => $mech->get_photo_data, text => 'update good good bad good', state => 'confirmed', mark_fixed => 0, @@ -283,7 +280,8 @@ subtest 'updates' => sub { $mech->get_ok($REPORT_URL); - $mech->content_contains('Photo of this report'); + $mech->content_contains('Photo of this report') + or die $mech->content; $mech->post_ok( $MODERATE_UPDATE_URL, { %update_prepopulated, |