-
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Waste] Move request timeframe to configuration.
- Loading branch information
Showing
10 changed files
with
37 additions
and
23 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
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
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 |
---|---|---|
|
@@ -9,7 +9,10 @@ END { FixMyStreet::App->log->enable('info'); } | |
|
||
my $mech = FixMyStreet::TestMech->new; | ||
|
||
my $body = $mech->create_body_ok(2482, 'Bromley Council', {}, { cobrand => 'bromley' }); | ||
my $body = $mech->create_body_ok(2482, 'Bromley Council', {}, { | ||
cobrand => 'bromley', | ||
wasteworks_config => { request_timeframe => "two weeks" } | ||
}); | ||
my $user = $mech->create_user_ok('[email protected]', name => 'Normal User'); | ||
$user->update({ phone => "07123 456789" }); | ||
my $nameless_user = $mech->create_user_ok('[email protected]', name => ''); | ||
|
@@ -248,6 +251,7 @@ FixMyStreet::override_config { | |
$mech->content_contains($user->email); | ||
$mech->submit_form_ok({ with_fields => { process => 'summary' } }); | ||
$mech->content_contains('Your container request has been sent'); | ||
$mech->content_contains('Containers typically arrive within two weeks,'); | ||
$mech->content_contains('Show upcoming bin days'); | ||
$mech->content_contains('/waste/12345"'); | ||
my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first; | ||
|
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 |
---|---|---|
|
@@ -24,7 +24,10 @@ my $params = { | |
jurisdiction => 'home', | ||
can_be_devolved => 1, | ||
}; | ||
my $body = $mech->create_body_ok(2498, 'Sutton Council', $params, { cobrand => 'sutton' }); | ||
my $body = $mech->create_body_ok(2498, 'Sutton Council', $params, { | ||
cobrand => 'sutton', | ||
wasteworks_config => { request_timeframe => '20 working days' } | ||
}); | ||
my $kingston = $mech->create_body_ok(2480, 'Kingston Council', $params, { cobrand => 'kingston' }); | ||
my $user = $mech->create_user_ok('[email protected]', name => 'Normal User'); | ||
my $staff = $mech->create_user_ok('[email protected]', name => 'Staff User', from_body => $kingston->id); | ||
|
@@ -107,11 +110,15 @@ FixMyStreet::override_config { | |
$mech->submit_form_ok({ with_fields => { name => 'Bob Marge', email => $user->email }}); | ||
$mech->submit_form_ok({ with_fields => { process => 'summary' } }); | ||
$mech->content_contains('request has been sent'); | ||
$mech->content_contains('Containers typically arrive within 20 working days'); | ||
my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first; | ||
is $report->get_extra_field_value('uprn'), 1000000002; | ||
is $report->detail, "Quantity: 1\n\n2 Example Street, Sutton, SM1 1AA\n\nReason: Damaged"; | ||
is $report->category, 'Request new container'; | ||
is $report->title, 'Request new Green paper and cardboard bin'; | ||
FixMyStreet::Script::Reports::send(); | ||
my $email = $mech->get_text_body_from_email; | ||
like $email, qr/please allow up to 20 working days/; | ||
}; | ||
subtest 'Report a new recycling raises a bin delivery request' => sub { | ||
$mech->log_in_ok($user->email); | ||
|
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
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
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
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
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
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