From 67823bc788ce744e1228a8602b9a5aa805771ced Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 10 Jul 2020 14:38:17 +0100 Subject: Centralise update creation to include fields. Given the user, we can infer the name if not provided, and the extra data if a staff user. We can also provide defaults for various other fields. Always have superuser take precedence over from_body. --- t/app/controller/admin/update_edit.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/app/controller/admin/update_edit.t') diff --git a/t/app/controller/admin/update_edit.t b/t/app/controller/admin/update_edit.t index 57c8973d4..8650e7771 100644 --- a/t/app/controller/admin/update_edit.t +++ b/t/app/controller/admin/update_edit.t @@ -81,7 +81,7 @@ for my $test ( fields => { text => 'this is an update', state => 'confirmed', - name => '', + name => 'Test User', anonymous => 1, username => $update->user->email, }, @@ -96,7 +96,7 @@ for my $test ( fields => { text => 'this is a changed update', state => 'confirmed', - name => '', + name => 'Test User', anonymous => 1, username => $update->user->email, }, -- cgit v1.2.3