From 018d38a553fc21571fb8d38bb6344bf958a09718 Mon Sep 17 00:00:00 2001 From: weeklies <80141759+weeklies@users.noreply.github.com> Date: Sat, 16 Sep 2023 22:23:42 +0800 Subject: [PATCH] AO3-6328 Houndilocks --- spec/models/tag_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb index d5cd1ad2718..8be026ad784 100644 --- a/spec/models/tag_spec.rb +++ b/spec/models/tag_spec.rb @@ -82,10 +82,10 @@ let(:tag) { create(:fandom) } let!(:work) { create(:work, fandom_string: tag.name) } - before { + before do Tag.write_redis_to_database tag.reload - } + end it "does not write to the database when reading the count" do tag.taggings_count @@ -141,7 +141,8 @@ it "triggers reindexing of tags which aren't used much" do create(:work, fandom_string: tag.name) - expect{ Tag.write_redis_to_database }.to add_to_reindex_queue(tag.reload, :main) + expect { Tag.write_redis_to_database } + .to add_to_reindex_queue(tag.reload, :main) end it "triggers reindexing of tags which are used significantly" do @@ -149,7 +150,8 @@ create(:work, fandom_string: tag.name) end - expect{ Tag.write_redis_to_database }.to add_to_reindex_queue(tag.reload, :main) + expect { Tag.write_redis_to_database } + .to add_to_reindex_queue(tag.reload, :main) end end end