Files
grecia/spec/lib/cache_spec.rb
Javi Martín ad14636255 Use Tag instead of ActsAsTaggableOn::Tag
It's shorter, it's easier to extend its behaviour, and it's easier to
integrate with other parts of our application, like translations.
2019-10-05 03:38:44 +02:00

15 lines
298 B
Ruby

require "rails_helper"
describe "Cache flow" do
describe "Tag destroy" do
it "invalidates Debate cache keys" do
debate = create(:debate, tag_list: "Good, Bad")
tag = Tag.find_by(name: "Bad")
expect { tag.destroy }.to change { debate.reload.cache_key }
end
end
end