aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/states.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-01-31 12:15:16 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-01-31 12:15:16 +0000
commit35445b8cc7ae02acdfbfc3e2e9da15b022736906 (patch)
tree4a77d625c14688ff89e9fc0ece499a99b4062879 /t/app/controller/admin/states.t
parentdf6212087ec4ba0fe5ea8b9cde1492cf69b84446 (diff)
parent2f8e3f7b86650d2b05b346615ac9f5fb7e8dcdb5 (diff)
Merge branch '1942-admin-anonymize'
Diffstat (limited to 't/app/controller/admin/states.t')
-rw-r--r--t/app/controller/admin/states.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/app/controller/admin/states.t b/t/app/controller/admin/states.t
new file mode 100644
index 000000000..60ffe5b88
--- /dev/null
+++ b/t/app/controller/admin/states.t
@@ -0,0 +1,24 @@
+use FixMyStreet::TestMech;
+
+my $mech = FixMyStreet::TestMech->new;
+
+my $user = $mech->create_user_ok('superuser@example.com', name => 'Super User', is_superuser => 1);
+
+$mech->log_in_ok( $user->email );
+
+subtest 'basic states admin' => sub {
+ $mech->get_ok('/admin/states');
+ $mech->submit_form_ok({ button => 'new', with_fields => { label => 'third party', type => 'closed', name => 'Third party referral' } });
+ $mech->content_contains('Third party referral');
+ $mech->content_contains('Fixed');
+ $mech->submit_form_ok({ button => 'delete:fixed' });
+ $mech->content_lacks('Fixed');
+ $mech->submit_form_ok({ form_number => 2, button => 'new_fixed' });
+ $mech->content_contains('Fixed');
+ $mech->submit_form_ok({ with_fields => { 'name:third party' => 'Third party incident' } });
+ $mech->content_contains('Third party incident');
+};
+
+# TODO Language tests
+
+done_testing;