From fc7935e5428ef80ecea46211fd4faf317079cd9c Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 13 Jul 2011 12:02:53 +0100 Subject: Test to close #18 (was fixed in Catalyst migration). --- t/app/controller/report_import.t | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 't/app/controller') diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t index 42b05e2b8..61ee28b88 100644 --- a/t/app/controller/report_import.t +++ b/t/app/controller/report_import.t @@ -127,6 +127,35 @@ subtest "Submit a correct entry" => sub { }, "check imported fields are shown"; + # Check photo present, and still there after map submission (testing bug #18) + $mech->content_contains( 'content_contains('longitude" value="-0.141587"', 'Check longitude'); + $mech->submit_form_ok( + { + button => 'tile_32742.21793', + x => 10, + y => 10, + }, + "New map location" + ); + $mech->content_contains( 'content_contains('longitude" value="-0.142608"', 'Check longitude'); + + # check that fields haven't changed at all + is_deeply $mech->visible_form_values, + { + name => 'Test User', + title => 'Test report', + detail => 'This is a test report', + photo => '', + phone => '', + may_show_name => '1', + category => '-- Pick a category --', + }, + "check imported fields are shown"; + # change the details $mech->submit_form_ok( # { -- cgit v1.2.3