summaryrefslogtreecommitdiff
path: root/spec/models/sentry_issue_spec.rb
blob: 48f9adf64afe56b67e4cc430bd49f14de7ff36de (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 SentryIssue do
  describe 'associations' do
    it { is_expected.to belong_to(:issue) }
  end

  describe 'validations' do
    let!(:sentry_issue) { create(:sentry_issue) }

    it { is_expected.to validate_presence_of(:issue) }
    it { is_expected.to validate_uniqueness_of(:issue) }
    it { is_expected.to validate_presence_of(:sentry_issue_identifier) }
    it { is_expected.to validate_uniqueness_of(:sentry_issue_identifier).with_message("has already been taken") }
  end
end