diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 4 | ||||
-rw-r--r-- | t/app/controller/admin.t | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 242194e01..37fa7a16d 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -1,5 +1,10 @@ package FixMyStreet::Cobrand::FixMyStreet; use base 'FixMyStreet::Cobrand::Default'; +# FixMyStreet should return all cobrands +sub restriction { + return {}; +} + 1; diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 9aaa8eca0..589abd178 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -12,6 +12,10 @@ sub site_restriction { return ( "and council='" . $self->council_id . "'", $self->council_url, { council => sprintf('%d', $self->council_id) } ); } +sub restriction { + return { cobrand => shift->moniker }; +} + sub problems_clause { my $self = shift; return { council => sprintf('%d', $self->council_id) }; diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 0a6f09585..d8a1c24a1 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -79,6 +79,8 @@ my $alert = FixMyStreet::App->model('DB::Alert')->find_or_create( subtest 'check summary counts' => sub { my $problems = FixMyStreet::App->model('DB::Problem')->search( { state => { -in => [qw/confirmed fixed closed investigating planned/, 'in progress', 'fixed - user', 'fixed - council'] } } ); + ok $mech->host('www.fixmystreet.com'); + my $problem_count = $problems->count; $problems->update( { cobrand => '' } ); |