Skip to content

Commit

Permalink
Fix deprecated use of Redis.current
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Jan 9, 2025
1 parent 4a25ea5 commit 201390c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions spec/requests/check_email_subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@

context "when a logout notice exists for that sub" do
before do
Redis.current.flushdb
Redis.current.set("logout-notice/#{sub}", Time.zone.now)
redis = Redis.new
redis.flushdb
redis.set("logout-notice/#{sub}", Time.zone.now)
end

it "logs the user out" do
Expand Down
5 changes: 3 additions & 2 deletions spec/requests/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

context "when a logout notice exists for that sub" do
before do
Redis.current.flushdb
Redis.current.set("logout-notice/#{session_identifier.user_id}", Time.zone.now)
redis = Redis.new
redis.flushdb
redis.set("logout-notice/#{session_identifier.user_id}", Time.zone.now)
end

it "logs the user out" do
Expand Down

0 comments on commit 201390c

Please sign in to comment.