iachat/spec/factories/users.rb
Sojan Jose 3988777718
Refactoring the code for pub sub (#155)
- We were using the attribute name 'channel' to store pubsub tokens, which was confusing.
- switched to faker from ffaker
- spec for contact.rb
2019-10-17 03:18:07 +05:30

23 lines
476 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :user do
transient do
skip_confirmation { true }
end
provider { 'email' }
uid { SecureRandom.uuid }
name { Faker::Name.name }
nickname { Faker::Name.first_name }
email { nickname + '@example.com' }
role { 'agent' }
password { "password" }
account
after(:build) do |user, evaluator|
user.skip_confirmation! if evaluator.skip_confirmation
end
end
end