diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-26 11:23:01 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-26 11:23:01 +0100 |
commit | 2f1eccb9d70c2e763761e3909235e803f80873c9 (patch) | |
tree | 61fa4e94afa323322bcdb7b5e1c7542967661cea /t/app/controller/admin.t | |
parent | a9a4fed583d7467c9c1f1fa56d42bcb75b4b488c (diff) |
add flagged checkbox to user edit admin page
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r-- | t/app/controller/admin.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 08cb4fb0d..324d13890 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -994,6 +994,9 @@ $log_entries = FixMyStreet::App->model('DB::AdminLog')->search( is $log_entries->count, 0, 'no admin log entries'; +$user->flagged( 0 ); +$user->update; + for my $test ( { desc => 'edit user name', @@ -1001,6 +1004,7 @@ for my $test ( name => 'Test User', email => 'test@example.com', council => 2509, + flagged => undef, }, changes => { name => 'Changed User', @@ -1014,6 +1018,7 @@ for my $test ( name => 'Changed User', email => 'test@example.com', council => 2509, + flagged => undef, }, changes => { email => 'changed@example.com', @@ -1027,6 +1032,7 @@ for my $test ( name => 'Changed User', email => 'changed@example.com', council => 2509, + flagged => undef, }, changes => { council => 2607, @@ -1034,6 +1040,20 @@ for my $test ( log_count => 3, log_entries => [qw/edit edit edit/], }, + { + desc => 'edit user flagged', + fields => { + name => 'Changed User', + email => 'changed@example.com', + council => 2607, + flagged => undef, + }, + changes => { + flagged => 'on', + }, + log_count => 4, + log_entries => [qw/edit edit edit edit/], + }, ) { subtest $test->{desc} => sub { $mech->get_ok( '/admin/user_edit/' . $user->id ); |