diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-31 16:15:46 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-31 16:15:46 +0100 |
commit | cec5c77a4207b341947affed8e6e8e57ec29965d (patch) | |
tree | 246900550b394f956a8ac4bd76ffbe943cc8fb1e /t/app/controller/admin_states.t | |
parent | c590981f0c198fa0491801a312a65eed054a0778 (diff) | |
parent | 51a5bcc74982aefea4f7b364e2f4bc49596bd9bf (diff) |
Merge branch 'move-report-states-to-database'
Diffstat (limited to 't/app/controller/admin_states.t')
-rw-r--r-- | t/app/controller/admin_states.t | 24 |
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; |