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

issue_assignee_spec.rb « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2d59ba15101a039d7411aeeec992369e3dfa8adc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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