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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 03:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 03:08:58 +0300
commit79216161b305b8d23b34226d45aa92dbae316cfe (patch)
treefbedafc415fcfb9970968ac17e94a443ce7ce477 /spec/models/issue_assignee_spec.rb
parentc1924b863ad66503edbaa3325949bce6b023b737 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/issue_assignee_spec.rb')
-rw-r--r--spec/models/issue_assignee_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/issue_assignee_spec.rb b/spec/models/issue_assignee_spec.rb
new file mode 100644
index 00000000000..2d59ba15101
--- /dev/null
+++ b/spec/models/issue_assignee_spec.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe IssueAssignee do
+ let(:issue) { create(:issue) }
+
+ subject { issue.issue_assignees.build(assignee: create(:user)) }
+
+ describe 'associations' do
+ it { is_expected.to belong_to(:issue).class_name('Issue') }
+ it { is_expected.to belong_to(:assignee).class_name('User') }
+ end
+
+ describe 'validations' do
+ it { is_expected.to validate_uniqueness_of(:assignee).scoped_to(:issue_id) }
+ end
+end