debian-mirror-gitlab/spec/models/issue_assignee_spec.rb
2020-03-13 15:44:24 +05:30

18 lines
467 B
Ruby

# 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