-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merton] Not currently using address change form.
- Loading branch information
Showing
2 changed files
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1143,34 +1143,34 @@ FixMyStreet::override_config { | |
}; | ||
$echo->mock('GetServiceUnitsForObject', \&garden_waste_one_bin); | ||
|
||
subtest 'staff change address for sub' => sub { | ||
set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection | ||
$mech->get_ok('/waste/12345/'); | ||
$mech->content_contains('Report an address change', "contains link to address change form"); | ||
$mech->follow_link_ok({ text => 'Report an address change' }); | ||
$mech->content_contains('Only fill this in if they confirm they have moved to the new property.', 'contains notice'); | ||
$mech->submit_form_ok({ with_fields => { | ||
extra_new_address => 'New Address', | ||
extra_old_address => 'Old Address', | ||
} }); | ||
$mech->submit_form_ok({ with_fields => { | ||
email => '[email protected]', | ||
name => 'Arthur Address-Change', | ||
} }); | ||
$mech->submit_form_ok({ with_fields => { process => 'summary' } }); | ||
$mech->content_contains('Your enquiry has been submitted'); | ||
|
||
my $new_report = FixMyStreet::DB->resultset('Problem')->search( | ||
{ }, | ||
{ order_by => { -desc => 'id' } }, | ||
)->first; | ||
|
||
is $new_report->category, 'Garden Subscription Address Change', 'correct category on report'; | ||
is $new_report->get_extra_field_value('new_address'), 'New Address', 'correct new address on report'; | ||
is $new_report->get_extra_field_value('old_address'), 'Old Address', 'correct old address on report'; | ||
is $new_report->get_extra_metadata('no_echo'), 1, 'metadata set to indicate not sent to echo'; | ||
is $new_report->send_state, 'sent', 'report marked as sent'; | ||
}; | ||
# subtest 'staff change address for sub' => sub { | ||
# set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection | ||
# $mech->get_ok('/waste/12345/'); | ||
# $mech->content_contains('Report an address change', "contains link to address change form"); | ||
# $mech->follow_link_ok({ text => 'Report an address change' }); | ||
# $mech->content_contains('Only fill this in if they confirm they have moved to the new property.', 'contains notice'); | ||
# $mech->submit_form_ok({ with_fields => { | ||
# extra_new_address => 'New Address', | ||
# extra_old_address => 'Old Address', | ||
# } }); | ||
# $mech->submit_form_ok({ with_fields => { | ||
# email => '[email protected]', | ||
# name => 'Arthur Address-Change', | ||
# } }); | ||
# $mech->submit_form_ok({ with_fields => { process => 'summary' } }); | ||
# $mech->content_contains('Your enquiry has been submitted'); | ||
|
||
# my $new_report = FixMyStreet::DB->resultset('Problem')->search( | ||
# { }, | ||
# { order_by => { -desc => 'id' } }, | ||
# )->first; | ||
|
||
# is $new_report->category, 'Garden Subscription Address Change', 'correct category on report'; | ||
# is $new_report->get_extra_field_value('new_address'), 'New Address', 'correct new address on report'; | ||
# is $new_report->get_extra_field_value('old_address'), 'Old Address', 'correct old address on report'; | ||
# is $new_report->get_extra_metadata('no_echo'), 1, 'metadata set to indicate not sent to echo'; | ||
# is $new_report->send_state, 'sent', 'report marked as sent'; | ||
# }; | ||
|
||
subtest 'cancel staff sub' => sub { | ||
set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters