diff options
author | Dave Arter <davea@mysociety.org> | 2020-01-31 15:13:26 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2020-02-26 15:25:31 +0000 |
commit | 8c4b2a45e990dfe2e41d34883f0a4a9171650557 (patch) | |
tree | 094f6e7a62b1a4b5803bf9199ec3038d25d79275 /t/app/controller/admin | |
parent | 351fc540d8a2a43563cddbc1a82a3331c7f3879f (diff) |
Show available cobrands in dropdown on FMS
For some reason switching to a Select stopped the update_model changes being applied
when persisting the model, meaning the INSERT query failed because the cobrand column
was null. This commit switches to a hidden input field for the cobrand which I’m
not super keen on, but it does get the job done...
Diffstat (limited to 't/app/controller/admin')
-rw-r--r-- | t/app/controller/admin/manifesttheme.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/app/controller/admin/manifesttheme.t b/t/app/controller/admin/manifesttheme.t index 11802cffc..9a86bdeb7 100644 --- a/t/app/controller/admin/manifesttheme.t +++ b/t/app/controller/admin/manifesttheme.t @@ -9,7 +9,7 @@ my $superuser = $mech->create_user_ok('superuser@example.com', name => 'Super Us $mech->log_in_ok( $superuser->email ); FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'lincolnshire', 'fixmystreet' ], + ALLOWED_COBRANDS => [ 'lincolnshire', 'tfl', 'fixmystreet' ], }, sub { ok $mech->host('lincolnshire.fixmystreet.com'); @@ -107,6 +107,7 @@ subtest "cobrand admin lets you add an icon to an existing theme" => sub { short_name => "Lincs FMS", background_colour => "#663399", theme_colour => "rgb(102, 51, 153)", + cobrand => 'lincolnshire', icon => [ $sample_jpeg, undef, Content_Type => 'image/jpeg' ], }, ); @@ -149,6 +150,7 @@ subtest "cobrand admin rejects non-images" => sub { short_name => "Lincs FMS", background_colour => "#663399", theme_colour => "rgb(102, 51, 153)", + cobrand => 'lincolnshire', icon => [ $sample_pdf, undef, Content_Type => 'application/pdf' ], }, ); @@ -196,6 +198,7 @@ subtest "can delete theme" => sub { short_name => "Lincs FMS", background_colour => "#663399", theme_colour => "rgb(102, 51, 153)", + cobrand => "lincolnshire", icon => [ $sample_jpeg, undef, Content_Type => 'image/jpeg' ], }, ); |