Commit 6fbb8179cbfbaa29a929540d3033be816104bc63
1 parent
1bf68a01
Exists in
master
and in
1 other branch
update wording from wins to losses on losses test
also, add new lines to several errors
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
lib/tasks/test_api.rake
| ... | ... | @@ -402,7 +402,7 @@ namespace :test_api do |
| 402 | 402 | end |
| 403 | 403 | |
| 404 | 404 | if (choice.losses != question.votes.count(:conditions => {:loser_choice_id => choice.id})) |
| 405 | - error_message += "Error!: Cached choice wins != actual choice wins for choice #{choice.id}\n" | |
| 405 | + error_message += "Error!: Cached choice losses != actual choice losses for choice #{choice.id}\n" | |
| 406 | 406 | error_bool= true |
| 407 | 407 | end |
| 408 | 408 | |
| ... | ... | @@ -410,27 +410,27 @@ namespace :test_api do |
| 410 | 410 | |
| 411 | 411 | |
| 412 | 412 | if (2*total_wins != total_votes) |
| 413 | - error_message += "Error 1: 2 x Total Wins != Total votes" | |
| 413 | + error_message += "Error 1: 2 x Total Wins != Total votes\n" | |
| 414 | 414 | error_bool= true |
| 415 | 415 | end |
| 416 | 416 | |
| 417 | 417 | if(total_votes % 2 != 0) |
| 418 | - error_message += "Error 2: Total votes is not Even!" | |
| 418 | + error_message += "Error 2: Total votes is not Even!\n" | |
| 419 | 419 | error_bool= true |
| 420 | 420 | end |
| 421 | 421 | |
| 422 | 422 | if(total_votes != 2* question.votes_count) |
| 423 | - error_message += "Error 3: Total votes != 2 x # vote objects" | |
| 423 | + error_message += "Error 3: Total votes != 2 x # vote objects\n" | |
| 424 | 424 | error_bool = true |
| 425 | 425 | end |
| 426 | 426 | |
| 427 | 427 | if(total_generated_prompts_on_right != total_generated_prompts_on_right) |
| 428 | - error_message += "Error 4: Total generated prompts on left != Total generated prompts on right" | |
| 428 | + error_message += "Error 4: Total generated prompts on left != Total generated prompts on right\n" | |
| 429 | 429 | error_bool = true |
| 430 | 430 | end |
| 431 | 431 | |
| 432 | 432 | if(total_scores_lte_fifty == question.choices.size || total_scores_gte_fifty == question.choices.size) && (total_scores_lte_fifty != total_scores_gte_fifty) |
| 433 | - error_message += "Error: The scores of all choices are either all above 50, or all below 50. This is probably wrong" | |
| 433 | + error_message += "Error: The scores of all choices are either all above 50, or all below 50. This is probably wrong\n" | |
| 434 | 434 | error_bool = true |
| 435 | 435 | puts "Error score fifty: #{question.id}" |
| 436 | 436 | end | ... | ... |