mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
test for side effect without mock
This commit is contained in:
parent
652b2d7199
commit
74dbe877d8
@ -50,8 +50,13 @@ describe PostTimestampChanger do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'deletes the stats cache' do
|
it 'deletes the stats cache' do
|
||||||
$redis.expects(:del).twice
|
$redis.set AdminDashboardData.stats_cache_key, "X"
|
||||||
|
$redis.set About.stats_cache_key, "X"
|
||||||
|
|
||||||
PostTimestampChanger.new(params).change!
|
PostTimestampChanger.new(params).change!
|
||||||
|
|
||||||
|
expect($redis.get(AdminDashboardData.stats_cache_key)).to eq(nil)
|
||||||
|
expect($redis.get(About.stats_cache_key)).to eq(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user