diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Westminster.pm | 2 | ||||
-rw-r--r-- | t/app/controller/auth_social.t | 3 | ||||
-rw-r--r-- | t/cobrand/westminster.t | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Westminster.pm b/perllib/FixMyStreet/Cobrand/Westminster.pm index ab8d0c40e..b26cde052 100644 --- a/perllib/FixMyStreet/Cobrand/Westminster.pm +++ b/perllib/FixMyStreet/Cobrand/Westminster.pm @@ -30,6 +30,8 @@ sub enter_postcode_text { sub send_questionnaires { 0 } +sub updates_disallowed { 1 } + sub social_auth_enabled { my $self = shift; diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index 62ab0b60f..ebde8e849 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -43,6 +43,7 @@ for my $test ( ALLOWED_COBRANDS => [ { fixmystreet => '.' } ], MAPIT_URL => 'http://mapit.uk/', }, + update => 1, email => 'facebook@example.org', uid => 123456789, mock => 't::Mock::Facebook', @@ -90,6 +91,8 @@ $resolver->mock('address', sub { $test->{email} }); for my $state ( 'refused', 'no email', 'existing UID', 'okay' ) { for my $page ( 'my', 'report', 'update' ) { + next if $page eq 'update' && !$test->{update}; + subtest "test $test->{type} '$state' login for page '$page'" => sub { # Lots of user changes happening here, make sure we don't confuse # Catalyst with a cookie session user that no longer exists diff --git a/t/cobrand/westminster.t b/t/cobrand/westminster.t index 64e93be47..2c79fb734 100644 --- a/t/cobrand/westminster.t +++ b/t/cobrand/westminster.t @@ -26,6 +26,12 @@ FixMyStreet::override_config { $mech->get_ok("/auth"); $mech->content_contains("Login with MyWestminster"); }; + + subtest 'Reports do not have update form' => sub { + my ($report) = $mech->create_problems_for_body(1, 2504, 'Title'); + $mech->get_ok('/report/' . $report->id); + $mech->content_lacks('Provide an update'); + } }; for ( |