summaryrefslogtreecommitdiff
path: root/spec/models/milestone_note_spec.rb
blob: 9e77ef91bb29aae64578f757d968c3d6f5366b92 (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 MilestoneNote do
  describe '.from_event' do
    let(:author) { create(:user) }
    let(:project) { create(:project, :repository) }
    let(:noteable) { create(:issue, author: author, project: project) }
    let(:event) { create(:resource_milestone_event, issue: noteable) }

    subject { described_class.from_event(event, resource: noteable, resource_parent: project) }

    it_behaves_like 'a system note', exclude_project: true do
      let(:action) { 'milestone' }
    end
  end
end