chore: Increase custom filter limit from 50 to 1000 per user (#12603)
# Pull Request Template ## Description This PR increases the custom filter limit from 50 to 1000 per user ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ### Screenshot <img width="1264" height="71" alt="image" src="https://github.com/user-attachments/assets/e12667bb-147c-4115-b8a8-9113fca471db" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
This commit is contained in:
@@ -93,9 +93,9 @@ RSpec.describe 'Custom Filters API', type: :request do
|
||||
expect(json_response['name']).to eq 'vip-customers'
|
||||
end
|
||||
|
||||
it 'gives the error for 51st record' do
|
||||
it 'gives the error for 1001st record' do
|
||||
CustomFilter.delete_all
|
||||
CustomFilter::MAX_FILTER_PER_USER.times do
|
||||
Limits::MAX_CUSTOM_FILTERS_PER_USER.times do
|
||||
create(:custom_filter, user: user, account: account)
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ RSpec.describe 'Custom Filters API', type: :request do
|
||||
expect(response).to have_http_status(:unprocessable_entity)
|
||||
json_response = response.parsed_body
|
||||
expect(json_response['message']).to include(
|
||||
'Account Limit reached. The maximum number of allowed custom filters for a user per account is 50.'
|
||||
'Account Limit reached. The maximum number of allowed custom filters for a user per account is 1000.'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user