0
0
Fork 0

Reference value constants from specs (#33479)

This commit is contained in:
Matt Jankowski 2025-01-06 18:25:13 -05:00 committed by GitHub
parent b0634b2943
commit efcd4ea5de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 19 additions and 12 deletions

View file

@ -85,7 +85,7 @@ RSpec.describe 'credentials API' do
end
describe 'with invalid data' do
let(:params) { { note: 'This is too long. ' * 30 } }
let(:params) { { note: 'a' * 2 * Account::NOTE_LENGTH_LIMIT } }
it 'returns http unprocessable entity' do
subject

View file

@ -29,7 +29,7 @@ RSpec.describe 'Accounts Notes API' do
end
context 'when account note exceeds allowed length', :aggregate_failures do
let(:comment) { 'a' * 2_001 }
let(:comment) { 'a' * AccountNote::COMMENT_SIZE_LIMIT * 2 }
it 'does not create account note' do
subject

View file

@ -33,7 +33,7 @@ RSpec.describe 'Media API', :attachment_processing do
let(:params) do
{
file: fixture_file_upload('attachment-jpg.123456_abcd', 'image/jpeg'),
description: 'aa' * MediaAttachment::MAX_DESCRIPTION_LENGTH,
description: 'a' * MediaAttachment::MAX_DESCRIPTION_LENGTH * 2,
}
end