diff --git a/spec/models/match_spec.rb b/spec/models/match_spec.rb index 74fc582..ad31ac6 100644 --- a/spec/models/match_spec.rb +++ b/spec/models/match_spec.rb @@ -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 diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb index b930c5c..ce229fa 100644 --- a/spec/models/team_spec.rb +++ b/spec/models/team_spec.rb @@ -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