mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 05:27: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user