about summary refs log tree commit diff
path: root/spec/controllers/concerns
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-18 20:29:56 +0100
committerGitHub <noreply@github.com>2018-01-18 20:29:56 +0100
commit9b3b40df660d90fddb7563def4fab9b5cee701e9 (patch)
tree533d983eb41e1f454c9931ba9171ce0ddc04c96f /spec/controllers/concerns
parentd799921c75e7bfb83504bb79dcc1c269c91d168c (diff)
Fix regeneration marker not expiring (#6290)
* Fix regeneration key not getting expired

* Add rake task to remove old regeneration markers
Diffstat (limited to 'spec/controllers/concerns')
-rw-r--r--spec/controllers/concerns/user_tracking_concern_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/concerns/user_tracking_concern_spec.rb b/spec/controllers/concerns/user_tracking_concern_spec.rb
index d08095ef8..1e5620221 100644
--- a/spec/controllers/concerns/user_tracking_concern_spec.rb
+++ b/spec/controllers/concerns/user_tracking_concern_spec.rb
@@ -69,6 +69,12 @@ describe ApplicationController, type: :controller do
         expect(RegenerationWorker).to have_received(:perform_async)
       end
 
+      it 'sets the regeneration marker to expire' do
+        allow(RegenerationWorker).to receive(:perform_async)
+        get :show
+        expect(Redis.current.ttl("account:#{user.account_id}:regeneration")).to be >= 0
+      end
+
       it 'regenerates feed when sign in is older than two weeks' do
         get :show