diff --git a/spec/models/group_score_spec.rb b/spec/models/group_score_spec.rb index bb3b409..8056e32 100644 --- a/spec/models/group_score_spec.rb +++ b/spec/models/group_score_spec.rb @@ -6,6 +6,9 @@ RSpec.describe GroupScore, type: :model do describe 'association' do it { should belong_to :team } it { should belong_to :group } + end + it 'has a valid factory' do + expect(build(:group_score)).to be_valid end end diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb index 7b5dc01..c4be2b3 100644 --- a/spec/models/team_spec.rb +++ b/spec/models/team_spec.rb @@ -11,6 +11,9 @@ RSpec.describe Team, type: :model do it { should belong_to :tournament } it { should have_many :group_score } it { should have_many :scores } + end + it 'has a valid factory' do + expect(build(:team)).to be_valid end end diff --git a/spec/models/tournament_spec.rb b/spec/models/tournament_spec.rb index 5948b90..5182e11 100644 --- a/spec/models/tournament_spec.rb +++ b/spec/models/tournament_spec.rb @@ -29,4 +29,8 @@ RSpec.describe Tournament, type: :model do it { should have_many :teams } it { should have_many :stages } end + + it 'has valid factory' do + expect(build(:tournament)).to be_valid + end end