debian-mirror-gitlab/spec/requests/api/resource_state_events_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
818 B
Ruby
Raw Permalink Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe API::ResourceStateEvents do
let_it_be(:user) { create(:user) }
let_it_be(:project, reload: true) { create(:project, :public, namespace: user.namespace) }
2022-10-11 01:57:18 +05:30
before do
parent.add_developer(user)
2020-07-28 23:09:34 +05:30
end
context 'when eventable is an Issue' do
it_behaves_like 'resource_state_events API', 'projects', 'issues', 'iid' do
let(:parent) { project }
let(:eventable) { create(:issue, project: project, author: user) }
end
end
context 'when eventable is a Merge Request' do
it_behaves_like 'resource_state_events API', 'projects', 'merge_requests', 'iid' do
let(:parent) { project }
let(:eventable) { create(:merge_request, source_project: project, target_project: project, author: user) }
end
end
end