Skip to content

Commit

Permalink
[Cycling UK] Fix error on /contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Jan 16, 2024
1 parent 9904ebe commit 44156bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions perllib/FixMyStreet/Cobrand/CyclingUK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,14 @@ sub report_new_munge_before_insert {
}


=item extra_contact_validation
This is used on the FixMyStreet cobrand for an anti-spam question. We don't have
that question on the CyclingUK cobrand so need to override this method otherwise
the validation in FixMyStreet will prevent the form being submitted.
=cut

sub extra_contact_validation {}

1;
11 changes: 11 additions & 0 deletions t/cobrand/cyclinguk.t
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,17 @@ subtest 'Dashboard CSV export' => sub {

$mech->log_out_ok;

subtest 'Contact form' => sub {
$mech->get_ok('/contact');
$mech->submit_form_ok({ with_fields => {
em => '[email protected]',
name => 'A name',
subject => 'A subject',
message => 'A message',
}});
$mech->content_contains("Thank you for your enquiry");
};

};

done_testing();

0 comments on commit 44156bd

Please sign in to comment.