Add association tests for new schema

This commit is contained in:
Thor77 2018-11-17 18:24:06 +01:00
parent b424b64422
commit 1a24dd3057
No known key found for this signature in database
GPG Key ID: 5051E71B46AA669A
2 changed files with 5 additions and 1 deletions

View File

@ -5,5 +5,7 @@ require 'rails_helper'
RSpec.describe GroupScore, type: :model do RSpec.describe GroupScore, type: :model do
describe 'association' do describe 'association' do
it { should belong_to :team } it { should belong_to :team }
it { should belong_to :group }
end end
end end

View File

@ -9,6 +9,8 @@ RSpec.describe Team, type: :model do
describe 'association' do describe 'association' do
it { should belong_to :tournament } it { should belong_to :tournament }
it { should have_one :group_score } it { should have_many :group_score }
it { should have_many :scores }
end end
end end