From 58ffe061b3970ac06f3b094eb312869e9a2d34c4 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 17 Mar 2021 11:04:15 +0100 Subject: [PATCH] Refactor exercise factories to pass user attribute to associations --- spec/factories/exercise.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/factories/exercise.rb b/spec/factories/exercise.rb index 931e6e51..3855a236 100644 --- a/spec/factories/exercise.rb +++ b/spec/factories/exercise.rb @@ -17,7 +17,7 @@ FactoryBot.define do factory :audio_video, class: 'Exercise' do created_by_teacher description { "Try HTML's audio and video capabilities." } - association :execution_environment, factory: :html + execution_environment { association :html, user: user } instructions { 'Build a simple website including an HTML