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:
Diffstat (limited to 'spec/models/issue_email_participant_spec.rb')
-rw-r--r--spec/models/issue_email_participant_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/issue_email_participant_spec.rb b/spec/models/issue_email_participant_spec.rb
index f19e65e31f3..09c231bbfda 100644
--- a/spec/models/issue_email_participant_spec.rb
+++ b/spec/models/issue_email_participant_spec.rb
@@ -11,9 +11,14 @@ RSpec.describe IssueEmailParticipant do
subject { build(:issue_email_participant) }
it { is_expected.to validate_presence_of(:issue) }
- it { is_expected.to validate_presence_of(:email) }
- it { is_expected.to validate_uniqueness_of(:email).scoped_to([:issue_id]) }
+ it { is_expected.to validate_uniqueness_of(:email).scoped_to([:issue_id]).ignoring_case_sensitivity }
- it_behaves_like 'an object with RFC3696 compliant email-formated attributes', :email
+ it_behaves_like 'an object with RFC3696 compliant email-formatted attributes', :email
+
+ it 'is invalid if the email is nil' do
+ subject.email = nil
+
+ expect(subject).to be_invalid
+ end
end
end