2018-09-07 09:39:20 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe LabelNote do
|
2020-02-05 07:09:15 -05:00
|
|
|
let_it_be(:project) { create(:project, :repository) }
|
|
|
|
let_it_be(:user) { create(:user) }
|
|
|
|
let_it_be(:label) { create(:label, project: project) }
|
|
|
|
let_it_be(:label2) { create(:label, project: project) }
|
2021-06-28 23:07:32 -04:00
|
|
|
|
2018-09-07 09:39:20 -04:00
|
|
|
let(:resource_parent) { project }
|
|
|
|
|
|
|
|
context 'when resource is issue' do
|
2020-02-05 07:09:15 -05:00
|
|
|
let_it_be(:resource) { create(:issue, project: project) }
|
2018-09-07 09:39:20 -04:00
|
|
|
|
|
|
|
it_behaves_like 'label note created from events'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when resource is merge request' do
|
2020-02-05 07:09:15 -05:00
|
|
|
let_it_be(:resource) { create(:merge_request, source_project: project, target_project: project) }
|
2018-09-07 09:39:20 -04:00
|
|
|
|
|
|
|
it_behaves_like 'label note created from events'
|
|
|
|
end
|
|
|
|
end
|