Commit b6a7a8da authored by Jarka Košanová's avatar Jarka Košanová

Add specs - add a subgroup issue to an epic

parent 08943e5e
......@@ -33,11 +33,28 @@ RSpec.shared_examples 'issue with epic_id parameter' do
let(:params) { { title: 'issue1', epic_id: epic.id } }
it 'creates epic issue link' do
issue = execute
context 'when a project is a direct child of the epic group' do
it 'creates epic issue link' do
issue = execute
expect(issue).to be_persisted
expect(issue.epic).to eq(epic)
expect(issue).to be_persisted
expect(issue.epic).to eq(epic)
end
end
context 'when a project is from a subgroup of the epic group' do
before do
subgroup = create(:group, parent: group)
create(:epic, group: subgroup)
project.update(group: subgroup)
end
it 'creates epic issue link' do
issue = execute
expect(issue).to be_persisted
expect(issue.epic).to eq(epic)
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