-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1504 from Ivanov-Anton/YETI-WEB-rename-factories-…
…to-be-annotated rename file name of factories to be annotated by annotate gem
- Loading branch information
Showing
199 changed files
with
4,396 additions
and
1,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: admin_users | ||
# | ||
# id :integer(4) not null, primary key | ||
# allowed_ips :inet is an Array | ||
# current_sign_in_at :timestamptz | ||
# current_sign_in_ip :string(255) | ||
# enabled :boolean default(TRUE) | ||
# encrypted_password :string(255) default(""), not null | ||
# last_sign_in_at :timestamptz | ||
# last_sign_in_ip :string(255) | ||
# per_page :json not null | ||
# remember_created_at :timestamptz | ||
# reset_password_sent_at :timestamptz | ||
# reset_password_token :string(255) | ||
# roles :string not null, is an Array | ||
# saved_filters :json not null | ||
# sign_in_count :integer(4) default(0) | ||
# stateful_filters :boolean default(FALSE), not null | ||
# username :string not null | ||
# visible_columns :json not null | ||
# created_at :timestamptz not null | ||
# updated_at :timestamptz not null | ||
# | ||
# Indexes | ||
# | ||
# admin_users_username_idx (username) UNIQUE | ||
# admin_users_username_key (username) UNIQUE | ||
# index_admin_users_on_reset_password_token (reset_password_token) UNIQUE | ||
# | ||
FactoryBot.define do | ||
factory :admin_user, class: 'AdminUser' do | ||
sequence(:username) { |n| "admin#{n}" } | ||
sequence(:email) { |n| "admin#{n}@example.com" } | ||
password { '111111' } | ||
roles { ['user'] } | ||
after(:build) do |admin| | ||
if admin.class.ldap? | ||
admin.encrypted_password = admin.encrypt_password(admin.password) | ||
end | ||
end | ||
|
||
trait :filled do | ||
association :billing_contact, factory: :contact | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: delayed_jobs | ||
# | ||
# id :integer(4) not null, primary key | ||
# attempts :integer(4) default(0), not null | ||
# failed_at :timestamptz | ||
# handler :text not null | ||
# last_error :text | ||
# locked_at :timestamptz | ||
# locked_by :string(255) | ||
# priority :integer(4) default(0), not null | ||
# queue :string(255) | ||
# run_at :timestamptz | ||
# unique_name :string | ||
# created_at :timestamptz not null | ||
# updated_at :timestamptz not null | ||
# | ||
# Indexes | ||
# | ||
# delayed_jobs_priority (priority,run_at) | ||
# | ||
|
||
FactoryBot.define do | ||
factory :background_task, class: 'BackgroundTask' do | ||
priority { 0 } | ||
attempts { 0 } | ||
handler { "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Worker::CdrExportJob\n job_id: 71b02934-f68e-4a98-a90c-de8d274a37ed\n provider_job_id: \n queue_name: cdr_export\n priority: \n arguments:\n - 1\n executions: 0\n locale: en\n" } | ||
end | ||
end |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: notifications.contacts | ||
# | ||
# id :integer(4) not null, primary key | ||
# email :string not null | ||
# notes :string | ||
# created_at :timestamptz | ||
# updated_at :timestamptz | ||
# admin_user_id :integer(4) | ||
# contractor_id :integer(4) | ||
# | ||
# Indexes | ||
# | ||
# contacts_contractor_id_idx (contractor_id) | ||
# | ||
# Foreign Keys | ||
# | ||
# contacts_admin_user_id_fkey (admin_user_id => admin_users.id) | ||
# contacts_contractor_id_fkey (contractor_id => contractors.id) | ||
# | ||
FactoryBot.define do | ||
factory :contact, class: 'Billing::Contact' do | ||
sequence(:email) { |n| "rspec_mail_#{n}@example.com" } | ||
|
||
association :contractor, factory: :customer | ||
|
||
trait :filled do | ||
association :contractor, factory: :customer | ||
admin_user { build(:admin_user, :filled) } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: invoice_templates | ||
# | ||
# id :integer(4) not null, primary key | ||
# data :binary | ||
# filename :string not null | ||
# name :string not null | ||
# sha1 :string | ||
# created_at :timestamptz | ||
# | ||
# Indexes | ||
# | ||
# invoices_templates_name_key (name) UNIQUE | ||
# | ||
FactoryBot.define do | ||
factory :invoice_template, class: 'Billing::InvoiceTemplate' do | ||
sequence(:name) { |n| "invoice_template#{n}" } | ||
filename { 'filename.odt' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.