-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SRCH-2243 change bulk upload email error message order (#758)
SRCH-2243 - Change bulk upload email error message order. Made 'Url already taken' messages show last in the email
- Loading branch information
1 parent
be8251c
commit 83ba83a
Showing
4 changed files
with
49 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
describe BulkUrlUploader::Results do | ||
subject(:results) { described_class.new('test bulk uploader') } | ||
|
||
describe '#errors' do | ||
context 'when there are "url already taken" errors' do | ||
before do | ||
results.add_error('Validation failed: Url has already been taken', 'https://irrelevant-to-the-spec.gov') | ||
results.add_error('Validation failed: SearchgovDomain is not a valid SearchgovDomain', 'https://irrelevant-to-the-spec.gov') | ||
end | ||
|
||
it 'puts them at the end of the list' do | ||
expect(results.error_messages).to eq( | ||
[ | ||
'Validation failed: SearchgovDomain is not a valid SearchgovDomain', | ||
'Validation failed: Url has already been taken' | ||
] | ||
) | ||
end | ||
end | ||
end | ||
end |