From 3f3cc7014b50efca22e3cfb9a568cfd9295cc7e1 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Fri, 19 Jun 2015 19:57:42 +0000 Subject: [PATCH] Fixed tests to include mats --- test/fixtures/mats.yml | 3 +++ test/integration/poolbracket_matchups_test.rb | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/test/fixtures/mats.yml b/test/fixtures/mats.yml index 308add6..dbb97d2 100644 --- a/test/fixtures/mats.yml +++ b/test/fixtures/mats.yml @@ -7,3 +7,6 @@ # two: # name: MyString # tournament_id: 1 + one: + name: Mat1 + tournament_id: 1 \ No newline at end of file diff --git a/test/integration/poolbracket_matchups_test.rb b/test/integration/poolbracket_matchups_test.rb index b87cc3d..3e338a3 100644 --- a/test/integration/poolbracket_matchups_test.rb +++ b/test/integration/poolbracket_matchups_test.rb @@ -7,10 +7,11 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest end def createTournament(numberOfWrestlers) - @id = 6000 + numberOfWrestlers + @id = 600 + numberOfWrestlers tournament = create_tournament create_school create_weight + create_mat create_wrestlers(numberOfWrestlers) tournament end @@ -35,6 +36,14 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest tournament_id: @id ).save! end + + def create_mat + Mat.new( + id: @id, + name: "Mat 1", + tournament_id: @id + ).save! + end def create_weight Weight.new(