0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 12:53:30 +08:00
discourse/spec/jobs/about_stats_spec.rb
Jarek Radosz fbb3bf3fe8
DEV: Enable Style/RedundantBegin rubocop rule (#40096)
(to be enabled in the shared config)

best reviewed with whitespace disabled
2026-05-19 18:44:54 +02:00

14 lines
372 B
Ruby
Vendored

# frozen_string_literal: true
RSpec.describe Jobs::AboutStats do
it "caches the stats" do
stats = About.fetch_stats.to_json
cache_key = About.stats_cache_key
Discourse.redis.del(cache_key)
expect(described_class.new.execute({})).to eq(stats)
expect(Discourse.redis.get(cache_key)).to eq(stats)
ensure
Discourse.redis.del(cache_key)
end
end