diff --git a/spec/factories/conferences.rb b/spec/factories/conferences.rb index 3d5288b..52f1be3 100644 --- a/spec/factories/conferences.rb +++ b/spec/factories/conferences.rb @@ -3,7 +3,7 @@ FactoryBot.define do factory :conference do sequence(:title) { |n| "Conference-#{n}" } - email + email { 'foo@example.com' } description { 'MyText' } start_date { '2014-07-29 21:29:13' } end_date { '2014-07-31 21:29:13' } diff --git a/spec/models/call_for_participation_spec.rb b/spec/models/call_for_participation_spec.rb index 24a6ce6..80594fb 100644 --- a/spec/models/call_for_participation_spec.rb +++ b/spec/models/call_for_participation_spec.rb @@ -1,7 +1,8 @@ require 'rails_helper' RSpec.describe CallForParticipation, type: :model do - let(:cfp) { build :call_for_participation } + let(:conference) { create :conference } + subject(:cfp) { build :call_for_participation, conference_id: conference.id } it 'belongs to a conference' do conference = create :conference