1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Speeding up tests and renaming generateMatchup methods

This commit is contained in:
2016-03-26 03:55:02 +00:00
17 changed files with 2814 additions and 729 deletions

View File

@@ -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

View File

@@ -5,7 +5,7 @@ class MatsControllerTest < ActionController::TestCase
setup do
@tournament = Tournament.find(1)
@tournament.generateMatchups
# @tournament.generateMatchups
@mat = mats(:one)
end

View File

@@ -5,7 +5,7 @@ class SchoolsControllerTest < ActionController::TestCase
setup do
@tournament = Tournament.find(1)
@tournament.generateMatchups
# @tournament.generateMatchups
@school = @tournament.schools.first
end

View File

@@ -5,7 +5,7 @@ class StaticPagesControllerTest < ActionController::TestCase
setup do
@tournament = Tournament.find(1)
@tournament.generateMatchups
# @tournament.generateMatchups
@school = @tournament.schools.first
end

View File

@@ -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)

View File

@@ -5,7 +5,7 @@ class WeightsControllerTest < ActionController::TestCase
setup do
@tournament = Tournament.find(1)
@tournament.generateMatchups
# @tournament.generateMatchups
@weight = @tournament.weights.first
end

View File

@@ -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