Commit b8587050 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Make build happy

parent b263c117
...@@ -2,7 +2,7 @@ class SystemNoteMetadata < ActiveRecord::Base ...@@ -2,7 +2,7 @@ class SystemNoteMetadata < ActiveRecord::Base
ICON_TYPES = %w[ ICON_TYPES = %w[
commit description merge confidential visible label assignee cross_reference commit description merge confidential visible label assignee cross_reference
title time_tracking branch milestone discussion task moved opened closed merged title time_tracking branch milestone discussion task moved opened closed merged
outdated approved unapproved relate outdated approved unapproved relate unrelate
].freeze ].freeze
validates :note, presence: true validates :note, presence: true
......
...@@ -581,7 +581,7 @@ module SystemNoteService ...@@ -581,7 +581,7 @@ module SystemNoteService
def unrelate_issue(noteable, noteable_ref, user) def unrelate_issue(noteable, noteable_ref, user)
body = "removed the relation with #{noteable_ref.to_reference(noteable.project)}" body = "removed the relation with #{noteable_ref.to_reference(noteable.project)}"
create_note(NoteSummary.new(noteable, noteable.project, user, body, action: 'relate')) create_note(NoteSummary.new(noteable, noteable.project, user, body, action: 'unrelate'))
end end
# Called when the merge request is approved by user # Called when the merge request is approved by user
......
...@@ -7,10 +7,10 @@ describe RelatedIssue do ...@@ -7,10 +7,10 @@ describe RelatedIssue do
end end
describe "Validation" do describe "Validation" do
subject { build :related_issue } subject { create :related_issue }
it { is_expected.to validate_presence_of(:issue) } it { is_expected.to validate_presence_of(:issue) }
it { is_expected.to validate_presence_of(:related_issue) } it { is_expected.to validate_presence_of(:related_issue) }
it { is_expected.to validate_uniqueness_of(:issue_id).scoped_to(:related_issue_id) } it { is_expected.to validate_uniqueness_of(:issue).scoped_to(:related_issue_id) }
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment