diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-14 10:24:11 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-14 10:24:11 +0000 |
commit | a50bce430fd1c103f43692e09f62f208c615f679 (patch) | |
tree | 50e0912682863a3b96947a499111769002efa2f4 /t/app/script/archive_old_enquiries.t | |
parent | c0fb85e249180ed58dd436caece3328938256296 (diff) | |
parent | 7305e916a9da3a72c8a4e9675d9bdcab6a4bc551 (diff) |
Merge branch 'warks-email-archive'
Diffstat (limited to 't/app/script/archive_old_enquiries.t')
-rw-r--r-- | t/app/script/archive_old_enquiries.t | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/t/app/script/archive_old_enquiries.t b/t/app/script/archive_old_enquiries.t index e1adeec85..0475cb9ea 100644 --- a/t/app/script/archive_old_enquiries.t +++ b/t/app/script/archive_old_enquiries.t @@ -5,15 +5,18 @@ my $mech = FixMyStreet::TestMech->new(); $mech->clear_emails_ok; -my $opts = { - commit => 1, -}; - my $user = $mech->create_user_ok('test@example.com', name => 'Test User'); my $oxfordshire = $mech->create_body_ok(2237, 'Oxfordshire County Council'); my $west_oxon = $mech->create_body_ok(2420, 'West Oxfordshire District Council'); -$opts->{body} = $oxfordshire->id; +my $opts = { + commit => 1, + body => $oxfordshire->id, + cobrand => 'oxfordshire', + closure_cutoff => "2015-01-01 00:00:00", + email_cutoff => "2016-01-01 00:00:00", + user => $user->id, +}; subtest 'sets reports to the correct status' => sub { FixMyStreet::override_config { @@ -65,6 +68,9 @@ subtest 'sets reports to the correct status' => sub { is $report4->state, 'closed', 'Report 4 has been set to closed'; is $report5->state, 'closed', 'Report 5 has been set to closed'; + my $comment = $report1->comments->first; + is $comment->problem_state, 'closed'; + is $report->state, 'confirmed', 'Recent report has been left alone'; }; }; |