feat: cache canned responses in the browser (#15401)

This commit is contained in:
Sivin Varghese
2026-08-13 11:54:32 +05:30
committed by GitHub
parent 590e17dfb7
commit 2ed68cf207
14 changed files with 356 additions and 63 deletions

View File

@@ -239,7 +239,7 @@ RSpec.describe 'Accounts API', type: :request do
as: :json
expect(response).to have_http_status(:success)
expect(response.parsed_body['cache_keys'].keys).to match_array(%w[label inbox team])
expect(response.parsed_body['cache_keys'].keys).to match_array(%w[label inbox team canned_response])
end
it 'sets the appropriate cache headers' do

View File

@@ -153,7 +153,7 @@ RSpec.describe 'Super Admin accounts API', type: :request do
context 'when it is an authenticated user' do
it 'shows the list of accounts' do
expect(account.cache_keys.keys).to contain_exactly(:inbox, :label, :team)
expect(account.cache_keys.keys).to contain_exactly(:inbox, :label, :team, :canned_response)
sign_in(super_admin, scope: :super_admin)
now_timestamp = Time.now.utc.to_i