Adds missing error handling spec

pull/855/head
Hagen Schink 11 years ago
parent 0b74a3fa85
commit bdbb101516
  1. 12
      spec/controllers/api/v2/planning_elements_controller_spec.rb

@ -551,6 +551,7 @@ describe Api::V2::PlanningElementsController do
describe 'update.xml' do
let(:project) { FactoryGirl.create(:project, :is_public => false) }
let(:work_package) { FactoryGirl.create(:work_package) }
become_admin
@ -571,6 +572,17 @@ describe Api::V2::PlanningElementsController do
it_should_behave_like "a controller action which needs project permissions"
end
describe 'empty' do
before do
put :update,
project_id: work_package.project_id,
id: work_package.id,
format: :xml
end
it { expect(response.status).to eq(400) }
end
describe 'with custom fields' do
let(:type) { Type.find_by_name("None") || FactoryGirl.create(:type_standard) }

Loading…
Cancel
Save