aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-01-09 09:48:29 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-01-09 09:48:29 +0000
commit193c3937954f58cc325b2227155ab8eb8bece51b (patch)
tree2297d7037d2f0b95d89d1e718bd48c7a70d14b59 /t/cobrand
parent04fd28fcb9e4c9b212002cda75764fc3249cfdfd (diff)
parentcffacce503f6f34bbf362f1aae7c0218afbdee55 (diff)
Merge remote-tracking branch 'origin/optionally-hide-staging-banner'
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/staging.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/cobrand/staging.t b/t/cobrand/staging.t
new file mode 100644
index 000000000..5d79daa4b
--- /dev/null
+++ b/t/cobrand/staging.t
@@ -0,0 +1,18 @@
+use FixMyStreet::TestMech;
+my $mech = FixMyStreet::TestMech->new;
+
+subtest 'staging banner is visible by default on staging sites' => sub {
+ $mech->get_ok('/');
+ $mech->content_contains('<div class="dev-site-notice">');
+};
+
+FixMyStreet::override_config {
+ STAGING_FLAGS => { hide_staging_banner => 1 },
+}, sub {
+ subtest 'staging banner can be hidden through STAGING_FLAGS config' => sub {
+ $mech->get_ok('/');
+ $mech->content_lacks('<div class="dev-site-notice">');
+ };
+};
+
+done_testing();