expires debate cache after a new flag

This commit is contained in:
rgarcia
2015-09-07 17:24:53 +02:00
parent f11220206a
commit 6606d776f8
3 changed files with 18 additions and 1 deletions

View File

@@ -281,6 +281,11 @@ describe Debate do
.to change { debate.updated_at }
end
it "should expire cache when it has a new flag", :focus do
expect { create(:flag, flaggable: debate) }
.to change { debate.reload.updated_at }
end
it "should expire cache when it has a new tag" do
expect { debate.update(tag_list: "new tag") }
.to change { debate.updated_at }