fix: Avoid introducing new attributes in search (#12791)

Fix `Limit of total fields [1000] has been exceeded`


https://linear.app/chatwoot/issue/CW-5861/searchkickimporterror-type-=-illegal-argument-exception-reason-=-limit#comment-6b6e41bd
This commit is contained in:
Pranav
2025-11-04 13:28:51 -08:00
committed by GitHub
parent d9b840f161
commit 40c75941f5
3 changed files with 10 additions and 10 deletions

View File

@@ -15,11 +15,11 @@ RSpec.describe Widget::TokenService, type: :service do
end
it 'uses the configured value for token expiry' do
freeze_time do
travel_to '2025-01-01' do
token = service.generate_token
decoded = JWT.decode(token, Rails.application.secret_key_base, true, algorithm: 'HS256').first
expect(decoded['iat']).to eq(Time.now.to_i)
expect(decoded['exp']).to eq(30.days.from_now.to_i)
expect(decoded['iat']).to eq(Time.zone.now.to_i)
expect(decoded['exp']).to eq(Time.zone.now.to_i + 30.days.to_i)
end
end
end
@@ -30,11 +30,11 @@ RSpec.describe Widget::TokenService, type: :service do
end
it 'uses the default expiry' do
freeze_time do
travel_to '2025-01-01' do
token = service.generate_token
decoded = JWT.decode(token, Rails.application.secret_key_base, true, algorithm: 'HS256').first
expect(decoded['iat']).to eq(Time.now.to_i)
expect(decoded['exp']).to eq(180.days.from_now.to_i)
expect(decoded['iat']).to eq(Time.zone.now.to_i)
expect(decoded['exp']).to eq(Time.zone.now.to_i + 180.days.to_i)
end
end
end