FIX: drop fragment cache for flags (#28001)

Flags are stored in the memory of the process and a fragment cache is not necessary.
This commit is contained in:
Krzysztof Kotlarek
2024-07-22 12:37:33 +10:00
committed by GitHub
parent 43aa47b118
commit f41716d532
3 changed files with 4 additions and 35 deletions

View File

@ -1,24 +1,6 @@
# frozen_string_literal: true
RSpec.describe PostActionType do
describe "Callbacks" do
describe "#expiry_cache" do
it "should clear the cache on save" do
cache = ApplicationSerializer.fragment_cache
cache["post_action_types_#{I18n.locale}"] = "test"
cache["post_action_flag_types_#{I18n.locale}"] = "test2"
PostActionType.new(name_key: "some_key").save!
expect(cache["post_action_types_#{I18n.locale}"]).to eq(nil)
expect(cache["post_action_flag_types_#{I18n.locale}"]).to eq(nil)
ensure
ApplicationSerializer.fragment_cache.clear
end
end
end
describe "#types" do
context "when verifying enum sequence" do
before { @types = PostActionType.types }