##// END OF EJS Templates
Removed a few assertions....
Jean-Philippe Lang -
r6176:8769eb53bc7b
parent child
Show More
@@ -108,8 +108,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
108 end
108 end
109
109
110 context "/index.xml with filter" do
110 context "/index.xml with filter" do
111 should_allow_api_authentication(:get, "/projects/private-child/issues.xml?status_id=5")
112
113 should "show only issues with the status_id" do
111 should "show only issues with the status_id" do
114 get '/issues.xml?status_id=5'
112 get '/issues.xml?status_id=5'
115 assert_tag :tag => 'issues',
113 assert_tag :tag => 'issues',
@@ -119,8 +117,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
119 end
117 end
120
118
121 context "/index.json with filter" do
119 context "/index.json with filter" do
122 should_allow_api_authentication(:get, "/projects/private-child/issues.json?status_id=5")
123
124 should "show only issues with the status_id" do
120 should "show only issues with the status_id" do
125 get '/issues.json?status_id=5'
121 get '/issues.json?status_id=5'
126
122
@@ -304,11 +300,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
304 end
300 end
305
301
306 context "POST /issues.xml with failure" do
302 context "POST /issues.xml with failure" do
307 should_allow_api_authentication(:post,
308 '/issues.xml',
309 {:issue => {:project_id => 1}},
310 {:success_code => :unprocessable_entity})
311
312 should "have an errors tag" do
303 should "have an errors tag" do
313 assert_no_difference('Issue.count') do
304 assert_no_difference('Issue.count') do
314 post '/issues.xml', {:issue => {:project_id => 1}}, :authorization => credentials('jsmith')
305 post '/issues.xml', {:issue => {:project_id => 1}}, :authorization => credentials('jsmith')
@@ -339,11 +330,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
339 end
330 end
340
331
341 context "POST /issues.json with failure" do
332 context "POST /issues.json with failure" do
342 should_allow_api_authentication(:post,
343 '/issues.json',
344 {:issue => {:project_id => 1}},
345 {:success_code => :unprocessable_entity})
346
347 should "have an errors element" do
333 should "have an errors element" do
348 assert_no_difference('Issue.count') do
334 assert_no_difference('Issue.count') do
349 post '/issues.json', {:issue => {:project_id => 1}}, :authorization => credentials('jsmith')
335 post '/issues.json', {:issue => {:project_id => 1}}, :authorization => credentials('jsmith')
@@ -417,11 +403,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
417 @headers = { :authorization => credentials('jsmith') }
403 @headers = { :authorization => credentials('jsmith') }
418 end
404 end
419
405
420 should_allow_api_authentication(:put,
421 '/issues/6.xml',
422 {:issue => {:subject => ''}}, # Missing subject should fail
423 {:success_code => :unprocessable_entity})
424
425 should "not create a new issue" do
406 should "not create a new issue" do
426 assert_no_difference('Issue.count') do
407 assert_no_difference('Issue.count') do
427 put '/issues/6.xml', @parameters, @headers
408 put '/issues/6.xml', @parameters, @headers
@@ -486,11 +467,6 class ApiTest::IssuesTest < ActionController::IntegrationTest
486 @headers = { :authorization => credentials('jsmith') }
467 @headers = { :authorization => credentials('jsmith') }
487 end
468 end
488
469
489 should_allow_api_authentication(:put,
490 '/issues/6.json',
491 {:issue => {:subject => ''}}, # Missing subject should fail
492 {:success_code => :unprocessable_entity})
493
494 should "not create a new issue" do
470 should "not create a new issue" do
495 assert_no_difference('Issue.count') do
471 assert_no_difference('Issue.count') do
496 put '/issues/6.json', @parameters, @headers
472 put '/issues/6.json', @parameters, @headers
General Comments 0
You need to be logged in to leave comments. Login now