Skip to content

Commit 3a6b17f

Browse files
committed
minor cleanup of mod warning controller tests
1 parent 65723b5 commit 3a6b17f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

test/controllers/mod_warning_controller_test.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ class ModWarningControllerTest < ActionController::TestCase
9090

9191
std = users(:standard_user)
9292
warning = mod_warnings(:third_warning)
93-
9493
warning.update(active: true)
95-
post :lift, params: { user_id: std.id }
94+
95+
try_lift_suspension(std)
9696

9797
assert_response(:found)
9898
warning.reload
@@ -117,4 +117,9 @@ def try_create_mod_warning(subject, **opts)
117117
}.merge(opts)
118118
}
119119
end
120+
121+
# @param subject [User] for whome to lift the suspension
122+
def try_lift_suspension(subject)
123+
post :lift, params: { user_id: subject.id }
124+
end
120125
end

0 commit comments

Comments
 (0)