2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2019-01-14 04:11:50 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Cache do
|
|
|
|
describe '.get' do
|
|
|
|
before { allow(Rails.cache).to receive(:read) }
|
|
|
|
|
2021-05-31 13:05:54 +00:00
|
|
|
it 'alias of Rails.cache.read' do
|
|
|
|
described_class.read('foo')
|
2019-01-14 04:11:50 +00:00
|
|
|
|
|
|
|
expect(Rails.cache).to have_received(:read).with('foo')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|