Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-01-17 00:25:35 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-01-17 00:50:43 +0300
commitd633755350f1549d4643ac527980c9b28aa1287c (patch)
treeebc01173b6b22ae50f7e5526c2dd6d54c6841a1b /spec/models/abuse_report_spec.rb
parentb6e1df7ad4cc8854087355eececd0cd12e7eab74 (diff)
Use a more sensible message for the AbuseReport uniqueness validation
Previously it was "user has already been taken", when really we were saying the user has already been reported.
Diffstat (limited to 'spec/models/abuse_report_spec.rb')
-rw-r--r--spec/models/abuse_report_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/abuse_report_spec.rb b/spec/models/abuse_report_spec.rb
index f9be8fcbcfe..4799bbaa57c 100644
--- a/spec/models/abuse_report_spec.rb
+++ b/spec/models/abuse_report_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe AbuseReport, type: :model do
it { is_expected.to validate_presence_of(:reporter) }
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_presence_of(:message) }
- it { is_expected.to validate_uniqueness_of(:user_id) }
+ it { is_expected.to validate_uniqueness_of(:user_id).with_message('has already been reported') }
end
describe '#remove_user' do