Add association tests for new schema
This commit is contained in:
parent
b424b64422
commit
1a24dd3057
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue