summaryrefslogtreecommitdiff
path: root/spec/factories/group_members.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/group_members.rb')
-rw-r--r--spec/factories/group_members.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/group_members.rb b/spec/factories/group_members.rb
index ab2321c81c4..4b1bf9a7d11 100644
--- a/spec/factories/group_members.rb
+++ b/spec/factories/group_members.rb
@@ -35,6 +35,18 @@ FactoryBot.define do
access_level { GroupMember::MINIMAL_ACCESS }
end
+ trait :awaiting do
+ after(:create) do |member|
+ member.update!(state: ::Member::STATE_AWAITING)
+ end
+ end
+
+ trait :active do
+ after(:create) do |member|
+ member.update!(state: ::Member::STATE_ACTIVE)
+ end
+ end
+
transient do
tasks_to_be_done { [] }
end