Sha256: 01fb7b4d47dc3ab2da03c403ef4f01d5289c02b1a1904962374fe19b32d29a46

Contents?: true

Size: 982 Bytes

Versions: 3

Compression:

Stored size: 982 Bytes

Contents

# frozen_string_literal: true

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
FactoryBot.define do
  factory :task do
    user
    asset nil
    assigned_to nil
    completed_by nil
    name                { FFaker::Lorem.sentence[0, 64] }
    priority nil
    category            { %w[call email follow_up lunch meeting money presentation trip].sample }
    bucket "due_asap"
    due_at              { FactoryBot.generate(:time) }
    background_info     { FFaker::Lorem.paragraph[0, 255] }
    completed_at nil
    deleted_at nil
    updated_at          { FactoryBot.generate(:time) }
    created_at          { FactoryBot.generate(:time) }
  end

  factory :completed_task, parent: :task do
    completed_at { Date.yesterday }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fat_free_crm-0.18.2 spec/factories/task_factories.rb
fat_free_crm-0.18.1 spec/factories/task_factories.rb
fat_free_crm-0.18.0 spec/factories/task_factories.rb