Assert tournament/stage/group relations optional

This commit is contained in:
Thor77 2019-04-03 10:03:45 +02:00
parent d7a8504b45
commit a99ae0e248
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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