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:

committed by
Sebastian Serth

parent
0234414bae
commit
319c3ab3b4
14
spec/factories/programming_group.rb
Normal file
14
spec/factories/programming_group.rb
Normal 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
|
Reference in New Issue
Block a user