mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Speeding up tests and renaming a few methods in generateMatchups
This commit is contained in:
@@ -5,12 +5,12 @@ class MatchesControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
@match = @tournament.matches.first
|
||||
# @tournament.generateMatchups
|
||||
@match = Match.where("tournament_id = ? and mat_id = ?",1,1).first
|
||||
end
|
||||
|
||||
def post_update
|
||||
patch :update, id: @match.id, match: {w1: @match.w1, w2: @match.w2}
|
||||
patch :update, id: @match.id, match: {tournament_id: 1, mat_id: 1}
|
||||
end
|
||||
|
||||
def get_edit
|
||||
|
||||
@@ -5,7 +5,7 @@ class MatsControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@mat = mats(:one)
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class SchoolsControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@school = @tournament.schools.first
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class StaticPagesControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@school = @tournament.schools.first
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ include Devise::TestHelpers
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@school = @tournament.schools.first
|
||||
@wrestlers = @tournament.weights.first.wrestlers
|
||||
@adjust = Teampointadjust.find(1)
|
||||
|
||||
@@ -5,7 +5,7 @@ class WeightsControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@weight = @tournament.weights.first
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class WrestlersControllerTest < ActionController::TestCase
|
||||
|
||||
setup do
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
# @tournament.generateMatchups
|
||||
@school = @tournament.schools.first
|
||||
@wrestler = @school.wrestlers.first
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user