مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
initial test suite
هذا الالتزام موجود في:
32
spec/factories/organization_factory.rb
Normal file
32
spec/factories/organization_factory.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: organizations
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# uuid :string(255)
|
||||
# name :string(255)
|
||||
# permalink :string(255)
|
||||
# time_zone :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# ip_pool_id :integer
|
||||
# owner_id :integer
|
||||
# deleted_at :datetime
|
||||
# suspended_at :datetime
|
||||
# suspension_reason :string(255)
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_organizations_on_permalink (permalink)
|
||||
# index_organizations_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
|
||||
factory :organization do
|
||||
name "Acme Inc"
|
||||
sequence(:permalink) { |n| "org#{n}" }
|
||||
association :owner, :factory => :user
|
||||
end
|
||||
|
||||
end
|
||||
36
spec/factories/user_factory.rb
Normal file
36
spec/factories/user_factory.rb
Normal file
@@ -0,0 +1,36 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: users
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# uuid :string(255)
|
||||
# first_name :string(255)
|
||||
# last_name :string(255)
|
||||
# email_address :string(255)
|
||||
# password_digest :string(255)
|
||||
# time_zone :string(255)
|
||||
# email_verification_token :string(255)
|
||||
# email_verified_at :datetime
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# password_reset_token :string(255)
|
||||
# password_reset_token_valid_until :datetime
|
||||
# admin :boolean default(FALSE)
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_users_on_email_address (email_address)
|
||||
# index_users_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
|
||||
factory :user do
|
||||
first_name "John"
|
||||
last_name "Doe"
|
||||
password "passw0rd"
|
||||
email_verified_at Time.now
|
||||
sequence(:email_address) { |n| "user#{n}@example.com" }
|
||||
end
|
||||
|
||||
end
|
||||
المرجع في مشكلة جديدة
حظر مستخدم