diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-06-15 19:16:39 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-09-02 14:52:54 +0100 |
commit | 764a6b7f8056d55aeba4656cba279b27a60d6b1a (patch) | |
tree | c0363cb8a6fa49e4e7302a926df155ff6501089a /t/cobrand | |
parent | 36f64da7723794e5b3faf674821fcfe4d422ca8b (diff) |
[Bexley] Factor out BH code, fix offline test.
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/bexley.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t index 91e30ff50..8ce6c45f2 100644 --- a/t/cobrand/bexley.t +++ b/t/cobrand/bexley.t @@ -256,9 +256,10 @@ subtest 'geocoder' => sub { ] }; }; -my $bex = Test::MockModule->new('FixMyStreet::Cobrand::Bexley'); -$bex->mock('get', sub { - return <<EOF +subtest 'out of hours' => sub { + my $lwp = Test::MockModule->new('LWP::UserAgent'); + $lwp->mock('get', sub { + HTTP::Response->new(200, 'OK', [], <<EOF); { "england-and-wales": { "events": [ @@ -267,9 +268,8 @@ $bex->mock('get', sub { } } EOF -}); + }); -subtest 'out of hours' => sub { my $cobrand = FixMyStreet::Cobrand::Bexley->new; set_fixed_time('2019-10-16T12:00:00Z'); is $cobrand->_is_out_of_hours(), 0, 'not out of hours in the day'; |