|
|
|
@ -610,6 +610,32 @@ describe Api::V2::PlanningElementsController do |
|
|
|
|
custom_value.value.should == "Wurst" |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
## |
|
|
|
|
# It should be possible to update a planning element's status by transmitting the |
|
|
|
|
# field 'status_id'. The test tries to change a planning element's status from |
|
|
|
|
# status A to B. |
|
|
|
|
describe "status" do |
|
|
|
|
let(:status_a) { FactoryGirl.create :status } |
|
|
|
|
let(:status_b) { FactoryGirl.create :status } |
|
|
|
|
let(:planning_element) { FactoryGirl.create :work_package, :status => status_a } |
|
|
|
|
|
|
|
|
|
it 'is updated' do |
|
|
|
|
WorkPackage.find(planning_element.id).status.should == status_a |
|
|
|
|
|
|
|
|
|
put 'update', |
|
|
|
|
:project_id => project.identifier, |
|
|
|
|
:format => 'xml', |
|
|
|
|
:id => planning_element.id, |
|
|
|
|
:planning_element => { |
|
|
|
|
:status_id => status_b.id |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
response.response_code.should == 204 |
|
|
|
|
|
|
|
|
|
WorkPackage.find(planning_element.id).status.should == status_b |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe 'destroy.xml' do |
|
|
|
|