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

discussion_note_spec.rb « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 09adf4a95b52588b81dabe5a3cd6e8204b02d582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe DiscussionNote do
  describe '#to_ability_name' do
    subject { described_class.new.to_ability_name }

    it { is_expected.to eq('note') }
  end

  describe 'validations' do
    context 'when noteable is an abuse report' do
      subject { build(:discussion_note, noteable: build_stubbed(:abuse_report)) }

      it { is_expected.to be_valid }
    end
  end
end