1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 21:24:25 +00:00

Removed single weight match generation, fixed bracket names, reload weight matches for pool order, and auto delete errrored jobs

This commit is contained in:
2024-12-16 00:02:30 -05:00
parent 5f049793c8
commit a851436c0c
12 changed files with 69 additions and 45 deletions

View File

@@ -126,4 +126,28 @@ class MatchTest < ActiveSupport::TestCase
match.save
assert !match.valid?
end
test "Match pin_time_in_seconds should properly handle format mm:ss" do
create_double_elim_tournament_single_weight(14, "Regular Double Elimination 1-8")
matches = @tournament.matches.reload
match = matches.first
match.winner_id = match.w1
match.finished = 1
match.win_type = "Pin"
match.score = "02:03"
match.save
assert_equal 123, match.reload.pin_time_in_seconds
end
test "Match pin_time_in_seconds should properly handle format m:ss" do
create_double_elim_tournament_single_weight(14, "Regular Double Elimination 1-8")
matches = @tournament.matches.reload
match = matches.first
match.winner_id = match.w1
match.finished = 1
match.win_type = "Pin"
match.score = "2:03"
match.save
assert_equal 123, match.reload.pin_time_in_seconds
end
end