From 1a24dd3057a75fcc8df3c90309b357ec92bd3d57 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 17 Nov 2018 18:24:06 +0100 Subject: [PATCH] Add association tests for new schema --- spec/models/group_score_spec.rb | 2 ++ spec/models/team_spec.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/models/group_score_spec.rb b/spec/models/group_score_spec.rb index 0ce7665..bb3b409 100644 --- a/spec/models/group_score_spec.rb +++ b/spec/models/group_score_spec.rb @@ -5,5 +5,7 @@ require 'rails_helper' RSpec.describe GroupScore, type: :model do describe 'association' do it { should belong_to :team } + it { should belong_to :group } + end end diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb index edd6171..7b5dc01 100644 --- a/spec/models/team_spec.rb +++ b/spec/models/team_spec.rb @@ -9,6 +9,8 @@ RSpec.describe Team, type: :model do describe 'association' do it { should belong_to :tournament } - it { should have_one :group_score } + it { should have_many :group_score } + it { should have_many :scores } + end end