Sha256: f55f6ed0068b72a932c6753ce3c40e94a61cc5d2798bd3ff5ff01c13af9af32c

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

FactoryGirl.define do
  factory :bigbluebutton_room do |r|
    # meetingid with a random factor to avoid duplicated ids in consecutive test runs
    r.sequence(:meetingid) { |n| "meeting-#{n}-" + SecureRandom.hex(4) }

    r.association :server, :factory => :bigbluebutton_server
    r.sequence(:name) { |n| "Name#{n}" }
    r.attendee_key { Forgery(:basic).password :at_least => 10, :at_most => 16 }
    r.moderator_key { Forgery(:basic).password :at_least => 10, :at_most => 16 }
    r.attendee_api_password { SecureRandom.uuid }
    r.moderator_api_password { SecureRandom.uuid }
    r.welcome_msg { Forgery(:lorem_ipsum).sentences(2) }
    r.private false
    r.sequence(:param) { |n| "meeting-#{n}" }
    r.external false
    r.record_meeting false
    r.duration 0
    r.sequence(:voice_bridge) { |n| "7#{n.to_s.rjust(4, '0')}" }
    r.dial_number { SecureRandom.random_number(9999999).to_s }
    r.sequence(:logout_url) { |n| "http://bigbluebutton#{n}.test.com/logout" }
    r.sequence(:max_participants) { |n| n }

    after(:create) do |r|
      r.updated_at = r.updated_at.change(:usec => 0)
      r.created_at = r.created_at.change(:usec => 0)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bigbluebutton_rails-2.0.0 spec/factories/bigbluebutton_room.rb