File obs-server-2.10-0109-Adjust-rspec-tests-for-the-usage-of-recyclable-cache.patch of Package obs-server

From ee3951240e0207e2de81aa3d16b48ca60f5e0b40 Mon Sep 17 00:00:00 2001
From: Lukas Krause <lkrause@suse.de>
Date: Thu, 13 Feb 2020 16:36:55 +0100
Subject: [PATCH] Adjust rspec tests for the usage of recyclable cache key

---
 src/api/spec/models/bs_request_spec.rb | 4 ++--
 src/api/spec/models/review_spec.rb     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/api/spec/models/bs_request_spec.rb b/src/api/spec/models/bs_request_spec.rb
index 841c7a79e4..62cdf4707f 100644
--- a/src/api/spec/models/bs_request_spec.rb
+++ b/src/api/spec/models/bs_request_spec.rb
@@ -246,13 +246,13 @@ RSpec.describe BsRequest, vcr: true do
     RSpec.shared_examples "the subject's cache is reset when it's request changes" do
       before do
         Timecop.travel(1.minute)
-        @cache_key = user.cache_key
+        @cache_version = user.cache_version
         request.state = :review
         request.save
         user.reload
       end
 
-      it { expect(user.cache_key).not_to eq(@cache_key) }
+      it { expect(user.cache_version).not_to eq(@cache_version) }
     end
 
     context 'creator of bs_request' do
diff --git a/src/api/spec/models/review_spec.rb b/src/api/spec/models/review_spec.rb
index 2ed927974e..15622c7eb4 100644
--- a/src/api/spec/models/review_spec.rb
+++ b/src/api/spec/models/review_spec.rb
@@ -330,13 +330,13 @@ RSpec.describe Review do
     RSpec.shared_examples "the subject's cache is reset when it's review changes" do
       before do
         Timecop.travel(1.minute)
-        @cache_key = subject.cache_key
+        @cache_version = subject.cache_version
         review.state = :accepted
         review.save
         subject.reload
       end
 
-      it { expect(subject.cache_key).not_to eq(@cache_key) }
+      it { expect(subject.cache_version).not_to eq(@cache_version) }
     end
 
     context 'by_user' do
-- 
2.31.1