Files
codeocean/spec/factories/programming_group.rb
kiragrammel 319c3ab3b4 Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
2023-08-24 19:32:06 +02:00

15 lines
347 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :programming_group do
exercise factory: :math
after(:build) do |programming_group|
# Do not change anything if users were provided explicitly
next if programming_group.users.present?
programming_group.users = build_list(:external_user, 2)
end
end
end