Commit 9538982d authored by Robert Speicher's avatar Robert Speicher

Move Epic resource label API to its own spec

parent 3ec4637b
# frozen_string_literal: true
require 'spec_helper'
describe API::ResourceLabelEvents do
set(:user) { create(:user) }
set(:project) { create(:project, :public, :repository, namespace: user.namespace) }
set(:private_user) { create(:user) }
before do
project.add_developer(user)
end
context 'when eventable is an Epic' do
let(:group) { create(:group, :public) }
let(:epic) { create(:epic, group: group, author: user) }
before do
group.add_owner(user)
stub_licensed_features(epics: true)
end
it_behaves_like 'resource_label_events API', 'groups', 'epics', 'id' do
let(:parent) { group }
let(:eventable) { epic }
let!(:event) { create(:resource_label_event, epic: epic) }
end
end
end
......@@ -21,22 +21,6 @@ describe API::ResourceLabelEvents do
end
end
context 'when eventable is an Epic' do
let(:group) { create(:group, :public) }
let(:epic) { create(:epic, group: group, author: user) }
before do
group.add_owner(user)
stub_licensed_features(epics: true)
end
it_behaves_like 'resource_label_events API', 'groups', 'epics', 'id' do
let(:parent) { group }
let(:eventable) { epic }
let!(:event) { create(:resource_label_event, epic: epic) }
end
end
context 'when eventable is a Merge Request' do
let(:merge_request) { create(:merge_request, source_project: project, target_project: project, author: user) }
......
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