mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-31 19:45:45 +00:00
Fixed a number of N+1 issues on low traffic pages. I also added relevant html tests for these pages.
This commit is contained in:
@@ -215,5 +215,21 @@ class MatAssignmentRulesControllerTest < ActionController::TestCase
|
||||
assert_equal [1, 2, 3], rule.weight_classes
|
||||
assert_equal ['A1', 'B2'], rule.bracket_positions
|
||||
assert_equal [1, 2], rule.rounds
|
||||
end
|
||||
end
|
||||
|
||||
test "index lists created mat assignment rule once in html" do
|
||||
sign_in_owner
|
||||
unique_mat = Mat.create!(name: "Unique Mat #{SecureRandom.hex(4)}", tournament_id: @tournament.id)
|
||||
MatAssignmentRule.create!(
|
||||
mat_id: unique_mat.id,
|
||||
tournament_id: @tournament.id,
|
||||
weight_classes: [1],
|
||||
bracket_positions: ['1/2'],
|
||||
rounds: [2]
|
||||
)
|
||||
|
||||
index
|
||||
assert_response :success
|
||||
assert_equal 1, response.body.scan(unique_mat.name).size
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user