debian-mirror-gitlab/spec/models/label_note_spec.rb

24 lines
694 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
require 'spec_helper'
describe LabelNote do
2020-03-13 15:44:24 +05:30
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) }
2018-11-20 20:47:30 +05:30
let(:resource_parent) { project }
context 'when resource is issue' do
2020-03-13 15:44:24 +05:30
let_it_be(:resource) { create(:issue, project: project) }
2018-11-20 20:47:30 +05:30
it_behaves_like 'label note created from events'
end
context 'when resource is merge request' do
2020-03-13 15:44:24 +05:30
let_it_be(:resource) { create(:merge_request, source_project: project, target_project: project) }
2018-11-20 20:47:30 +05:30
it_behaves_like 'label note created from events'
end
end