From 2334235bd38c9e68e1233f02889afba2dd4572cc Mon Sep 17 00:00:00 2001 From: Alex Dolski Date: Thu, 18 Apr 2024 10:37:15 -0500 Subject: [PATCH] Add a test that create() caches submittable collections --- test/controllers/sessions_controller_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index a1545c0c..7c795097 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -121,6 +121,16 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest skip end + test "create() caches submittable collections" do + user = users(:southwest) + post "/auth/identity/callback", params: { + auth_key: user.email, + password: "password" + }, xhr: true + assert_equal 1, enqueued_jobs. + select{ |j| j['job_class'] == "CacheSubmittableCollectionsJob" }.count + end + # destroy() test "destroy() redirects to the root URL in a globally-scoped context" do