aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/offline.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/offline.t')
-rw-r--r--t/app/controller/offline.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/app/controller/offline.t b/t/app/controller/offline.t
index d2a5009ec..a3feae514 100644
--- a/t/app/controller/offline.t
+++ b/t/app/controller/offline.t
@@ -1,4 +1,5 @@
use FixMyStreet::TestMech;
+use FixMyStreet::DB;
use Path::Tiny;
my $mech = FixMyStreet::TestMech->new;
@@ -20,6 +21,21 @@ FixMyStreet::override_config {
sizes => '133x100'
}, 'correct icon';
};
+ subtest 'themed manifest' => sub {
+ FixMyStreet::DB->resultset('ManifestTheme')->create({
+ cobrand => "test",
+ name => "My Test Cobrand FMS",
+ short_name => "Test FMS",
+ background_colour => "#ff00ff",
+ theme_colour => "#ffffff",
+ });
+
+ my $j = $mech->get_ok_json('/.well-known/manifest.webmanifest');
+ is $j->{name}, 'My Test Cobrand FMS', 'correctly overridden name';
+ is $j->{short_name}, 'Test FMS', 'correctly overridden short_name';
+ is $j->{background_color}, '#ff00ff', 'correctly overridden background colour';
+ is $j->{theme_color}, '#ffffff', 'correctly overridden theme colour';
+ };
$theme_dir->remove_tree;
};