|
|
@ -180,16 +180,16 @@ describe Api::V2::PlanningElementsController do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe 'w/ 2 planning elements within a specific project and one PE requested' do |
|
|
|
describe 'w/ 2 planning elements within a specific project and one PE requested' do |
|
|
|
context 'with rewire_parents=0' do |
|
|
|
context 'with rewire_parents=false' do |
|
|
|
let!(:wp_parent) { FactoryGirl.create(:work_package, project_id: project.id) } |
|
|
|
let!(:wp_parent) { FactoryGirl.create(:work_package, project_id: project.id) } |
|
|
|
let!(:wp_child) { FactoryGirl.create(:work_package, project_id: project.id, |
|
|
|
let!(:wp_child) { FactoryGirl.create(:work_package, project_id: project.id, |
|
|
|
parent_id: wp_parent.id) } |
|
|
|
parent_id: wp_parent.id) } |
|
|
|
|
|
|
|
|
|
|
|
context 'with rewire_parents=0' do |
|
|
|
context 'with rewire_parents=false' do |
|
|
|
before do |
|
|
|
before do |
|
|
|
get 'index', project_id: project.id, |
|
|
|
get 'index', project_id: project.id, |
|
|
|
ids: wp_child.id.to_s, |
|
|
|
ids: wp_child.id.to_s, |
|
|
|
rewire_parents: '0', |
|
|
|
rewire_parents: 'false', |
|
|
|
format: 'xml' |
|
|
|
format: 'xml' |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -305,7 +305,7 @@ describe Api::V2::PlanningElementsController do |
|
|
|
|
|
|
|
|
|
|
|
context 'with rewire_parents=false' do |
|
|
|
context 'with rewire_parents=false' do |
|
|
|
before do |
|
|
|
before do |
|
|
|
get 'index', project_id: project1.id, format: 'xml', rewire_parents: '0' |
|
|
|
get 'index', project_id: project1.id, format: 'xml', rewire_parents: 'false' |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "doesn't rewire ancestors" do |
|
|
|
it "doesn't rewire ancestors" do |
|
|
|