diff options
Diffstat (limited to 'spec/factories/achievements/user_achievements.rb')
-rw-r--r-- | spec/factories/achievements/user_achievements.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/factories/achievements/user_achievements.rb b/spec/factories/achievements/user_achievements.rb new file mode 100644 index 00000000000..a5fd1df38dd --- /dev/null +++ b/spec/factories/achievements/user_achievements.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :user_achievement, class: 'Achievements::UserAchievement' do + user + achievement + awarded_by_user factory: :user + + trait :revoked do + revoked_by_user factory: :user + revoked_at { Time.now } + end + end +end |