Skip to content

Commit

Permalink
Clarify oversized resource array error message for resource matching
Browse files Browse the repository at this point in the history
[#161830301]
  • Loading branch information
sphawley authored and Pivotal committed Mar 15, 2019
1 parent 4674e49 commit 0469288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/messages/resource_match_create_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ResourceMatchCreateMessage < BaseMessage

validates :resources, array: true, length: {
maximum: 5000,
too_long: 'is too many (maximum is %{count} resources)',
too_long: 'can have at most %{count} resources)',
minimum: 1,
too_short: 'must have at least %{count} resource'
}
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/messages/resource_match_create_message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

it 'has the correct error message' do
expect(subject).to be_invalid
expect(subject.errors[:resources]).to include('is too many (maximum is 5000 resources)')
expect(subject.errors[:resources]).to include('can have at most 5000 resources)')
end
end

Expand Down

0 comments on commit 0469288

Please sign in to comment.