Assert tournament/stage/group relations optional
This commit is contained in:
parent
d7a8504b45
commit
a99ae0e248
|
|
@ -5,8 +5,8 @@ require 'rails_helper'
|
|||
RSpec.describe Match, type: :model do
|
||||
context 'association' do
|
||||
it { should have_many :match_scores }
|
||||
it { should belong_to :stage }
|
||||
it { should belong_to :group }
|
||||
it { should belong_to(:stage).optional }
|
||||
it { should belong_to(:group).optional }
|
||||
end
|
||||
|
||||
context '#new' do
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ RSpec.describe Team, type: :model do
|
|||
end
|
||||
|
||||
describe 'association' do
|
||||
it { should belong_to :tournament }
|
||||
it { should belong_to(:tournament).optional }
|
||||
it { should have_many :group_scores }
|
||||
it { should have_many :match_scores }
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue