diff options
author | Struan Donald <struan@exo.org.uk> | 2018-09-28 16:04:50 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-09-28 16:04:50 +0100 |
commit | c01a986773642a152095b25f1d006ca561e975e0 (patch) | |
tree | 05ad96349ba80dcc19b8a3748b346dc3b1aa7f0a /t/app/controller/admin/permissions.t | |
parent | 6b1ff7d44d1b7533bf5037c0a9c1c5d8db4e1e0b (diff) | |
parent | 31e2a02395b4b3479e8abb7949a29fc437aa6ef6 (diff) |
Merge branch 'issues/commercial/1192-pre-occ-go-live'
Diffstat (limited to 't/app/controller/admin/permissions.t')
-rw-r--r-- | t/app/controller/admin/permissions.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/app/controller/admin/permissions.t b/t/app/controller/admin/permissions.t index e7f85d140..3fc221a63 100644 --- a/t/app/controller/admin/permissions.t +++ b/t/app/controller/admin/permissions.t @@ -1,4 +1,5 @@ use FixMyStreet::TestMech; +use Test::MockModule; my $mech = FixMyStreet::TestMech->new; @@ -28,6 +29,13 @@ ok $report, "created test report - $report_id"; $mech->log_in_ok( $oxfordshireuser->email ); +my $cobrand = Test::MockModule->new('FixMyStreet::Cobrand::Oxfordshire'); +$cobrand->mock('available_permissions', sub { + my $self = shift; + + return FixMyStreet::Cobrand::Default->available_permissions; +}); + subtest "Users can't edit report without report_edit permission" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'oxfordshire' ], |