DEV: Clear ColorScheme.hex_cache to avoid leaking state.

This commit is contained in:
Guo Xiang Tan
2018-10-15 11:15:31 +08:00
parent 2acb885c72
commit 5ae4cbcf88
4 changed files with 15 additions and 3 deletions

View File

@ -1040,9 +1040,14 @@ describe Topic do
it "resets the topic archetype" do
topic.expects(:add_moderator_post)
MessageBus.expects(:publish).with("/site/banner", nil)
topic.remove_banner!(user)
message = MessageBus.track_publish do
topic.remove_banner!(user)
end.first
expect(topic.archetype).to eq(Archetype.default)
expect(message.channel).to eq("/site/banner")
expect(message.data).to eq(nil)
end
end