##// END OF EJS Templates
remove redundant empty lines from test/test_helper.rb...
Toshi MARUYAMA -
r10095:e1492f771c17
parent child
Show More
@@ -288,7 +288,6 class ActiveSupport::TestCase
288 end
288 end
289 end
289 end
290 end
290 end
291
292 end
291 end
293
292
294 # Test that a request allows the API key with HTTP BASIC
293 # Test that a request allows the API key with HTTP BASIC
@@ -312,7 +311,6 class ActiveSupport::TestCase
312 @token = Token.create!(:user => @user, :action => 'api')
311 @token = Token.create!(:user => @user, :action => 'api')
313 send(http_method, url, parameters, credentials(@token.value, 'X'))
312 send(http_method, url, parameters, credentials(@token.value, 'X'))
314 end
313 end
315
316 should_respond_with success_code
314 should_respond_with success_code
317 should_respond_with_content_type_based_on_url(url)
315 should_respond_with_content_type_based_on_url(url)
318 should_be_a_valid_response_string_based_on_url(url)
316 should_be_a_valid_response_string_based_on_url(url)
@@ -327,7 +325,6 class ActiveSupport::TestCase
327 @token = Token.create!(:user => @user, :action => 'feeds')
325 @token = Token.create!(:user => @user, :action => 'feeds')
328 send(http_method, url, parameters, credentials(@token.value, 'X'))
326 send(http_method, url, parameters, credentials(@token.value, 'X'))
329 end
327 end
330
331 should_respond_with failure_code
328 should_respond_with failure_code
332 should_respond_with_content_type_based_on_url(url)
329 should_respond_with_content_type_based_on_url(url)
333 should "not login as the user" do
330 should "not login as the user" do
@@ -364,7 +361,6 class ActiveSupport::TestCase
364 end
361 end
365 send(http_method, request_url, parameters)
362 send(http_method, request_url, parameters)
366 end
363 end
367
368 should_respond_with success_code
364 should_respond_with success_code
369 should_respond_with_content_type_based_on_url(url)
365 should_respond_with_content_type_based_on_url(url)
370 should_be_a_valid_response_string_based_on_url(url)
366 should_be_a_valid_response_string_based_on_url(url)
@@ -387,7 +383,6 class ActiveSupport::TestCase
387 end
383 end
388 send(http_method, request_url, parameters)
384 send(http_method, request_url, parameters)
389 end
385 end
390
391 should_respond_with failure_code
386 should_respond_with failure_code
392 should_respond_with_content_type_based_on_url(url)
387 should_respond_with_content_type_based_on_url(url)
393 should "not login as the user" do
388 should "not login as the user" do
@@ -404,7 +399,6 class ActiveSupport::TestCase
404 @token = Token.create!(:user => @user, :action => 'api')
399 @token = Token.create!(:user => @user, :action => 'api')
405 send(http_method, url, parameters, {'X-Redmine-API-Key' => @token.value.to_s})
400 send(http_method, url, parameters, {'X-Redmine-API-Key' => @token.value.to_s})
406 end
401 end
407
408 should_respond_with success_code
402 should_respond_with success_code
409 should_respond_with_content_type_based_on_url(url)
403 should_respond_with_content_type_based_on_url(url)
410 should_be_a_valid_response_string_based_on_url(url)
404 should_be_a_valid_response_string_based_on_url(url)
@@ -433,7 +427,6 class ActiveSupport::TestCase
433 else
427 else
434 raise "Unknown content type for should_respond_with_content_type_based_on_url: #{url}"
428 raise "Unknown content type for should_respond_with_content_type_based_on_url: #{url}"
435 end
429 end
436
437 end
430 end
438
431
439 # Uses the url to assert which format the response should be in
432 # Uses the url to assert which format the response should be in
@@ -451,7 +444,6 class ActiveSupport::TestCase
451 else
444 else
452 raise "Unknown content type for should_be_a_valid_response_based_on_url: #{url}"
445 raise "Unknown content type for should_be_a_valid_response_based_on_url: #{url}"
453 end
446 end
454
455 end
447 end
456
448
457 # Checks that the response is a valid JSON string
449 # Checks that the response is a valid JSON string
General Comments 0
You need to be logged in to leave comments. Login now