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