Add ProgrammingGroup & ProgrammingGroupMembership

* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
This commit is contained in:
kiragrammel
2023-08-10 17:07:04 +02:00
committed by Sebastian Serth
parent 0234414bae
commit 319c3ab3b4
42 changed files with 715 additions and 276 deletions

View File

@ -0,0 +1,14 @@
# 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