From e6168038bbf207385e16c8a35f89f7cad78c8e0e Mon Sep 17 00:00:00 2001 From: Anton-Ivanov Date: Mon, 15 Jul 2024 08:32:14 +0300 Subject: [PATCH] specify the "class" option for each factory in the project --- spec/factories/account_balance_notification_settings.rb | 2 +- spec/factories/accounts.rb | 2 +- spec/factories/active_calls.rb | 2 +- spec/factories/admin_users.rb | 2 +- spec/factories/api_access.rb | 2 +- spec/factories/audit_log_items.rb | 2 +- spec/factories/background_tasks.rb | 2 +- spec/factories/billing/contacts.rb | 2 +- spec/factories/billing/invoice_documents.rb | 2 +- spec/factories/billing/invoice_originated_destinations.rb | 2 +- spec/factories/billing/invoice_originated_networks.rb | 2 +- spec/factories/billing/invoice_service_data.rb | 2 +- spec/factories/billing/invoice_templates.rb | 2 +- spec/factories/billing/invoice_terminated_destinations.rb | 2 +- spec/factories/billing/invoice_terminated_networks.rb | 2 +- spec/factories/billing/invoices.rb | 2 +- spec/factories/billing/package_counters.rb | 2 +- spec/factories/billing/service_types.rb | 2 +- spec/factories/billing/services.rb | 2 +- spec/factories/billing/transactions.rb | 2 +- spec/factories/cdr/auth_logs.rb | 2 +- spec/factories/cdr/cdrs.rb | 2 +- spec/factories/cdr_exports.rb | 2 +- spec/factories/cnam/database_https.rb | 2 +- spec/factories/cnam/databases.rb | 2 +- spec/factories/codec_group_codec.rb | 2 +- spec/factories/codec_groups.rb | 2 +- spec/factories/contractors.rb | 2 +- spec/factories/cron_job_infos.rb | 2 +- spec/factories/customers_auths.rb | 2 +- spec/factories/dialpeer_next_rates.rb | 2 +- spec/factories/dialpeers.rb | 2 +- spec/factories/disconnect_codes.rb | 2 +- spec/factories/disconnect_policy.rb | 2 +- spec/factories/disconnect_policy_code.rb | 2 +- .../equipment/radius/accounting_profile_start_attributes.rb | 2 +- .../equipment/radius/accounting_profile_stop_attributes.rb | 2 +- spec/factories/equipment/radius/accounting_profiles.rb | 2 +- spec/factories/equipment/radius/auth_profiles.rb | 2 +- spec/factories/equipment/registrations.rb | 2 +- spec/factories/equipment/sip_options_probers.rb | 2 +- spec/factories/equipment/stir_shaken/signing_certificates.rb | 2 +- spec/factories/equipment/stir_shaken/trusted_certificates.rb | 2 +- spec/factories/equipment/stir_shaken/trusted_repositories.rb | 2 +- spec/factories/events.rb | 2 +- spec/factories/gateway_groups.rb | 2 +- spec/factories/gateways.rb | 2 +- spec/factories/gateways_stats.rb | 2 +- spec/factories/importing/accounts.rb | 2 +- spec/factories/importing/contractors.rb | 2 +- spec/factories/importing/customers_auths.rb | 2 +- spec/factories/importing/destinations.rb | 2 +- spec/factories/importing/dialpeers.rb | 2 +- spec/factories/importing/disconnect_policies.rb | 2 +- spec/factories/importing/gateway_groups.rb | 2 +- spec/factories/importing/gateways.rb | 2 +- spec/factories/importing/numberlist_items.rb | 2 +- spec/factories/importing/numberlists.rb | 2 +- spec/factories/importing/rateplans.rb | 2 +- spec/factories/importing/registrations.rb | 2 +- spec/factories/importing/routing_groups.rb | 2 +- spec/factories/importing/routing_tag_detection_rules.rb | 2 +- spec/factories/incoming_registrations.rb | 2 +- spec/factories/lnp/caches.rb | 2 +- spec/factories/lnp/databases.rb | 2 +- spec/factories/lnp/routing_plan_lnp_rules.rb | 2 +- spec/factories/log/api_logs.rb | 2 +- spec/factories/log/balance_notifications.rb | 2 +- spec/factories/log/email_logs.rb | 2 +- spec/factories/logic_logs.rb | 2 +- spec/factories/nodes.rb | 2 +- spec/factories/notification/attachments.rb | 2 +- spec/factories/outgoing_registrations.rb | 2 +- spec/factories/payments.rb | 2 +- spec/factories/pops.rb | 2 +- spec/factories/realtime_sip_options_probers.rb | 2 +- spec/factories/report/custom_cdr_schedulers.rb | 2 +- spec/factories/report/custom_cdrs.rb | 2 +- spec/factories/report/custom_data.rb | 2 +- spec/factories/report/customer_traffic_schedulers.rb | 2 +- spec/factories/report/customer_traffics.rb | 2 +- spec/factories/report/interval_cdr_schedulers.rb | 2 +- spec/factories/report/interval_cdrs.rb | 2 +- spec/factories/report/interval_data.rb | 2 +- spec/factories/report/realtime/bad_routings.rb | 2 +- spec/factories/report/realtime/not_authenticateds.rb | 2 +- spec/factories/report/scheduler_periods.rb | 2 +- spec/factories/report/vendor_traffic_schedulers.rb | 2 +- spec/factories/report/vendor_traffics.rb | 2 +- spec/factories/routing/area_prefixes.rb | 2 +- spec/factories/routing/areas.rb | 2 +- spec/factories/routing/destination_next_rates.rb | 2 +- spec/factories/routing/destinations.rb | 2 +- spec/factories/routing/numberlist_items.rb | 2 +- spec/factories/routing/numberlists.rb | 2 +- spec/factories/routing/rate_groups.rb | 2 +- spec/factories/routing/rateplans.rb | 2 +- spec/factories/routing/routeset_discriminators.rb | 2 +- spec/factories/routing/routing_groups.rb | 2 +- spec/factories/routing/routing_plan_static_routes.rb | 2 +- spec/factories/routing/routing_plans.rb | 2 +- spec/factories/routing/routing_tag_detection_rules.rb | 2 +- spec/factories/routing/routing_tags.rb | 2 +- spec/factories/routing/tag_actions.rb | 2 +- spec/factories/rtp_statistics/rx_streams.rb | 2 +- spec/factories/rtp_statistics/tx_streams.rb | 2 +- spec/factories/stats/active_call_accounts.rb | 2 +- spec/factories/stats/active_call_orig_gateways.rb | 2 +- spec/factories/stats/active_call_term_gateways.rb | 2 +- spec/factories/stats/active_calls.rb | 2 +- spec/factories/stats/customer_auth_stats.rb | 2 +- spec/factories/stats/termination_quality_stats.rb | 2 +- spec/factories/system/api_log_configs.rb | 2 +- spec/factories/system/cdr_configs.rb | 2 +- spec/factories/system/cdr_price_round_modes.rb | 2 +- spec/factories/system/cdr_round_modes.rb | 2 +- spec/factories/system/countries.rb | 2 +- spec/factories/system/event_subscriptions.rb | 2 +- spec/factories/system/lnp_resolvers.rb | 2 +- spec/factories/system/load_balancers.rb | 2 +- spec/factories/system/lua_scripts.rb | 2 +- spec/factories/system/network_prefixes.rb | 2 +- spec/factories/system/network_types.rb | 2 +- spec/factories/system/networks.rb | 2 +- spec/factories/system/sensors.rb | 2 +- spec/factories/system/smtp_connections.rb | 2 +- spec/factories/system/timezones.rb | 2 +- 127 files changed, 127 insertions(+), 127 deletions(-) diff --git a/spec/factories/account_balance_notification_settings.rb b/spec/factories/account_balance_notification_settings.rb index fd01aa604..479b941ea 100644 --- a/spec/factories/account_balance_notification_settings.rb +++ b/spec/factories/account_balance_notification_settings.rb @@ -20,6 +20,6 @@ # fk_rails_f185d22f87 (account_id => accounts.id) # FactoryBot.define do - factory :account_balance_notification_setting do + factory :account_balance_notification_setting, class: 'AccountBalanceNotificationSetting' do end end diff --git a/spec/factories/accounts.rb b/spec/factories/accounts.rb index c0ca69ed0..9c388d4cc 100644 --- a/spec/factories/accounts.rb +++ b/spec/factories/accounts.rb @@ -39,7 +39,7 @@ # accounts_timezone_id_fkey (timezone_id => timezones.id) # FactoryBot.define do - factory :account, class: Account do + factory :account, class: 'Account' do sequence(:name) { |n| "account#{n}" } association :contractor, vendor: true balance { 0 } diff --git a/spec/factories/active_calls.rb b/spec/factories/active_calls.rb index 42336915c..72cd0b9c6 100644 --- a/spec/factories/active_calls.rb +++ b/spec/factories/active_calls.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true FactoryBot.define do - factory :active_call, class: RealtimeData::ActiveCall do + factory :active_call, class: 'RealtimeData::ActiveCall' do trait :filled do duration { (rand(60) + rand).round(7) } start_time { rand(120..179).seconds.ago.to_f } diff --git a/spec/factories/admin_users.rb b/spec/factories/admin_users.rb index 132fe1ca6..e2633256c 100644 --- a/spec/factories/admin_users.rb +++ b/spec/factories/admin_users.rb @@ -32,7 +32,7 @@ # index_admin_users_on_reset_password_token (reset_password_token) UNIQUE # FactoryBot.define do - factory :admin_user do + factory :admin_user, class: 'AdminUser' do sequence(:username) { |n| "admin#{n}" } sequence(:email) { |n| "admin#{n}@example.com" } password { '111111' } diff --git a/spec/factories/api_access.rb b/spec/factories/api_access.rb index 0ca93ca36..b08b37025 100644 --- a/spec/factories/api_access.rb +++ b/spec/factories/api_access.rb @@ -21,7 +21,7 @@ # api_access_customer_id_fkey (customer_id => contractors.id) FactoryBot.define do - factory :api_access, class: System::ApiAccess do + factory :api_access, class: 'System::ApiAccess' do sequence(:login) { |n| "api_access-#{n}" } password { ('a'..'z').to_a.shuffle.join } allowed_ips { ['0.0.0.0', '127.0.0.1'] } diff --git a/spec/factories/audit_log_items.rb b/spec/factories/audit_log_items.rb index 6fdb17c6b..ea3c2bc00 100644 --- a/spec/factories/audit_log_items.rb +++ b/spec/factories/audit_log_items.rb @@ -21,7 +21,7 @@ # FactoryBot.define do - factory :audit_log_item, class: AuditLogItem do + factory :audit_log_item, class: 'AuditLogItem' do item_type { 'Account' } association :item, factory: :account event { 'update' } diff --git a/spec/factories/background_tasks.rb b/spec/factories/background_tasks.rb index 0221b6d77..c97ce0a80 100644 --- a/spec/factories/background_tasks.rb +++ b/spec/factories/background_tasks.rb @@ -24,7 +24,7 @@ # FactoryBot.define do - factory :background_task, class: BackgroundTask 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" } diff --git a/spec/factories/billing/contacts.rb b/spec/factories/billing/contacts.rb index 19e627162..3c6cf4982 100644 --- a/spec/factories/billing/contacts.rb +++ b/spec/factories/billing/contacts.rb @@ -22,7 +22,7 @@ # contacts_contractor_id_fkey (contractor_id => contractors.id) # FactoryBot.define do - factory :contact, class: Billing::Contact do + factory :contact, class: 'Billing::Contact' do sequence(:email) { |n| "rspec_mail_#{n}@example.com" } association :contractor, factory: :customer diff --git a/spec/factories/billing/invoice_documents.rb b/spec/factories/billing/invoice_documents.rb index 53c4970c2..98acd83d1 100644 --- a/spec/factories/billing/invoice_documents.rb +++ b/spec/factories/billing/invoice_documents.rb @@ -20,7 +20,7 @@ # FactoryBot.define do - factory :invoice_document, class: Billing::InvoiceDocument do + factory :invoice_document, class: 'Billing::InvoiceDocument' do invoice filename { 'fine.example' } diff --git a/spec/factories/billing/invoice_originated_destinations.rb b/spec/factories/billing/invoice_originated_destinations.rb index c983fc3da..5184f95ab 100644 --- a/spec/factories/billing/invoice_originated_destinations.rb +++ b/spec/factories/billing/invoice_originated_destinations.rb @@ -29,7 +29,7 @@ # FactoryBot.define do - factory :invoice_originated_destination, class: Billing::InvoiceOriginatedDestination do + factory :invoice_originated_destination, class: 'Billing::InvoiceOriginatedDestination' do invoice { FactoryBot.create(:invoice, :manual, account: FactoryBot.create(:account)) } trait :filled do diff --git a/spec/factories/billing/invoice_originated_networks.rb b/spec/factories/billing/invoice_originated_networks.rb index deb7a5605..786e2412d 100644 --- a/spec/factories/billing/invoice_originated_networks.rb +++ b/spec/factories/billing/invoice_originated_networks.rb @@ -28,7 +28,7 @@ # FactoryBot.define do - factory :invoice_originated_network, class: Billing::InvoiceOriginatedNetwork do + factory :invoice_originated_network, class: 'Billing::InvoiceOriginatedNetwork' do invoice { FactoryBot.create(:invoice, :manual, account: FactoryBot.create(:account)) } trait :filled do diff --git a/spec/factories/billing/invoice_service_data.rb b/spec/factories/billing/invoice_service_data.rb index a82733979..2b06ffc77 100644 --- a/spec/factories/billing/invoice_service_data.rb +++ b/spec/factories/billing/invoice_service_data.rb @@ -20,7 +20,7 @@ # invoice_service_data_invoice_id_fkey (invoice_id => invoices.id) # FactoryBot.define do - factory :invoice_service_data, class: Billing::InvoiceServiceData do + factory :invoice_service_data, class: 'Billing::InvoiceServiceData' do invoice { FactoryBot.create(:invoice, :manual, account: FactoryBot.create(:account)) } transactions_count { 1 } amount { 0.01 } diff --git a/spec/factories/billing/invoice_templates.rb b/spec/factories/billing/invoice_templates.rb index 3804668a4..246132391 100644 --- a/spec/factories/billing/invoice_templates.rb +++ b/spec/factories/billing/invoice_templates.rb @@ -16,7 +16,7 @@ # invoices_templates_name_key (name) UNIQUE # FactoryBot.define do - factory :invoice_template, class: Billing::InvoiceTemplate do + factory :invoice_template, class: 'Billing::InvoiceTemplate' do sequence(:name) { |n| "invoice_template#{n}" } filename { 'filename.odt' } end diff --git a/spec/factories/billing/invoice_terminated_destinations.rb b/spec/factories/billing/invoice_terminated_destinations.rb index 7a31e0fa0..3abc3ee4d 100644 --- a/spec/factories/billing/invoice_terminated_destinations.rb +++ b/spec/factories/billing/invoice_terminated_destinations.rb @@ -29,7 +29,7 @@ # FactoryBot.define do - factory :invoice_terminated_destination, class: Billing::InvoiceTerminatedDestination do + factory :invoice_terminated_destination, class: 'Billing::InvoiceTerminatedDestination' do invoice { FactoryBot.create(:invoice, :manual, account: FactoryBot.create(:account)) } trait :filled do diff --git a/spec/factories/billing/invoice_terminated_networks.rb b/spec/factories/billing/invoice_terminated_networks.rb index f0cfbf100..05ea07f19 100644 --- a/spec/factories/billing/invoice_terminated_networks.rb +++ b/spec/factories/billing/invoice_terminated_networks.rb @@ -28,7 +28,7 @@ # FactoryBot.define do - factory :invoice_terminated_network, class: Billing::InvoiceTerminatedNetwork do + factory :invoice_terminated_network, class: 'Billing::InvoiceTerminatedNetwork' do invoice { FactoryBot.create(:invoice, :manual, account: FactoryBot.create(:account)) } trait :filled do diff --git a/spec/factories/billing/invoices.rb b/spec/factories/billing/invoices.rb index 974203570..d7fdd946b 100644 --- a/spec/factories/billing/invoices.rb +++ b/spec/factories/billing/invoices.rb @@ -42,7 +42,7 @@ # index_billing.invoices_on_reference (reference) # FactoryBot.define do - factory :invoice, class: Billing::Invoice do + factory :invoice, class: 'Billing::Invoice' do start_date { 7.days.ago.utc } end_date { 1.day.ago.utc } state_id { Billing::InvoiceState::NEW } diff --git a/spec/factories/billing/package_counters.rb b/spec/factories/billing/package_counters.rb index 24d1dca46..926128947 100644 --- a/spec/factories/billing/package_counters.rb +++ b/spec/factories/billing/package_counters.rb @@ -22,7 +22,7 @@ # package_counters_account_id_fkey (account_id => accounts.id) # FactoryBot.define do - factory :billing_package_counter, class: Billing::PackageCounter do + factory :billing_package_counter, class: 'Billing::PackageCounter' do account { FactoryBot.create(:account) } service { FactoryBot.create(:service) } prefix { '' } diff --git a/spec/factories/billing/service_types.rb b/spec/factories/billing/service_types.rb index b9c187f12..8bd04ab9b 100644 --- a/spec/factories/billing/service_types.rb +++ b/spec/factories/billing/service_types.rb @@ -15,7 +15,7 @@ # service_types_name_key (name) UNIQUE # FactoryBot.define do - factory :service_type, class: Billing::ServiceType do + factory :service_type, class: 'Billing::ServiceType' do sequence(:name) { |n| "Service Type #{n}" } provisioning_class { 'Billing::Provisioning::Logging' } variables { { 'foo' => 'bar' } } diff --git a/spec/factories/billing/services.rb b/spec/factories/billing/services.rb index 198550299..94a40ccd1 100644 --- a/spec/factories/billing/services.rb +++ b/spec/factories/billing/services.rb @@ -30,7 +30,7 @@ # services_type_id_fkey (type_id => service_types.id) # FactoryBot.define do - factory :service, class: Billing::Service do + factory :service, class: 'Billing::Service' do sequence(:name) { |n| "Service_#{n}" } account { FactoryBot.create(:account) } type { FactoryBot.create(:service_type) } diff --git a/spec/factories/billing/transactions.rb b/spec/factories/billing/transactions.rb index 7e33a3855..bc3d1f340 100644 --- a/spec/factories/billing/transactions.rb +++ b/spec/factories/billing/transactions.rb @@ -23,7 +23,7 @@ # transactions_account_id_fkey (account_id => accounts.id) # FactoryBot.define do - factory :billing_transaction, class: Billing::Transaction do + factory :billing_transaction, class: 'Billing::Transaction' do transient do spent { true } end diff --git a/spec/factories/cdr/auth_logs.rb b/spec/factories/cdr/auth_logs.rb index 8bd8d653d..d8e32ca1b 100644 --- a/spec/factories/cdr/auth_logs.rb +++ b/spec/factories/cdr/auth_logs.rb @@ -44,7 +44,7 @@ # auth_log_request_time_idx (request_time) # FactoryBot.define do - factory :auth_log, class: Cdr::AuthLog do + factory :auth_log, class: 'Cdr::AuthLog' do request_time { 1.minute.ago } code { 200 } reason { 'OK' } diff --git a/spec/factories/cdr/cdrs.rb b/spec/factories/cdr/cdrs.rb index f6c11760e..95b81622c 100644 --- a/spec/factories/cdr/cdrs.rb +++ b/spec/factories/cdr/cdrs.rb @@ -157,7 +157,7 @@ # cdr_vendor_id_time_start_idx (vendor_id,time_start) # FactoryBot.define do - factory :cdr, class: Cdr::Cdr do + factory :cdr, class: 'Cdr::Cdr' do uuid { SecureRandom.uuid } is_last_cdr { true } time_start { 1.minute.ago } diff --git a/spec/factories/cdr_exports.rb b/spec/factories/cdr_exports.rb index d71071c66..f582e3317 100644 --- a/spec/factories/cdr_exports.rb +++ b/spec/factories/cdr_exports.rb @@ -26,7 +26,7 @@ # fk_rails_e796f29195 (customer_account_id => accounts.id) # FactoryBot.define do - factory :cdr_export, class: CdrExport do + factory :cdr_export, class: 'CdrExport' do type { 'Base' } callback_url { nil } filters do diff --git a/spec/factories/cnam/database_https.rb b/spec/factories/cnam/database_https.rb index a068e7035..c20419d82 100644 --- a/spec/factories/cnam/database_https.rb +++ b/spec/factories/cnam/database_https.rb @@ -9,7 +9,7 @@ # url :string not null # FactoryBot.define do - factory :cnam_database_http, class: Cnam::DatabaseHttp do + factory :cnam_database_http, class: 'Cnam::DatabaseHttp' do url { 'https://example.com/{pai}' } timeout { 15_000 } end diff --git a/spec/factories/cnam/databases.rb b/spec/factories/cnam/databases.rb index 208c859ed..135fba241 100644 --- a/spec/factories/cnam/databases.rb +++ b/spec/factories/cnam/databases.rb @@ -18,7 +18,7 @@ # cnam_databases_name_key (name) UNIQUE # FactoryBot.define do - factory :cnam_database, class: Cnam::Database do + factory :cnam_database, class: 'Cnam::Database' do sequence(:name) { |n| "CNAM db script_#{n}" } request_lua { 'arg.a="000"; table.insert(arg.v,9); return arg;' } response_lua { 'arg.a="000"; table.insert(arg.v,9); return arg;' } diff --git a/spec/factories/codec_group_codec.rb b/spec/factories/codec_group_codec.rb index e3a22d3cf..3578865af 100644 --- a/spec/factories/codec_group_codec.rb +++ b/spec/factories/codec_group_codec.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :codec_group_codec do + factory :codec_group_codec, class: 'CodecGroupCodec' do sequence(:priority, 10) dynamic_payload_type { 100 } end diff --git a/spec/factories/codec_groups.rb b/spec/factories/codec_groups.rb index d6d74257a..5cba22647 100644 --- a/spec/factories/codec_groups.rb +++ b/spec/factories/codec_groups.rb @@ -12,7 +12,7 @@ # codec_groups_name_key (name) UNIQUE # FactoryBot.define do - factory :codec_group do + factory :codec_group, class: 'CodecGroup' do sequence(:name) { |n| "codec_group#{n}" } codec_group_codecs do [ diff --git a/spec/factories/contractors.rb b/spec/factories/contractors.rb index 2c5bae6fc..7d9c4e771 100644 --- a/spec/factories/contractors.rb +++ b/spec/factories/contractors.rb @@ -25,7 +25,7 @@ # contractors_smtp_connection_id_fkey (smtp_connection_id => smtp_connections.id) # FactoryBot.define do - factory :contractor, class: Contractor do + factory :contractor, class: 'Contractor' do sequence(:name) { |n| "contractor#{n}" } enabled { true } vendor { false } diff --git a/spec/factories/cron_job_infos.rb b/spec/factories/cron_job_infos.rb index 920e54b88..e934be709 100644 --- a/spec/factories/cron_job_infos.rb +++ b/spec/factories/cron_job_infos.rb @@ -11,7 +11,7 @@ # name :string not null # FactoryBot.define do - factory :cron_job_info, class: CronJobInfo do + factory :cron_job_info, class: 'CronJobInfo' do name { nil } # required trait :active do diff --git a/spec/factories/customers_auths.rb b/spec/factories/customers_auths.rb index 0193316b9..d0e03fbef 100644 --- a/spec/factories/customers_auths.rb +++ b/spec/factories/customers_auths.rb @@ -104,7 +104,7 @@ # customers_auth_transport_protocol_id_fkey (transport_protocol_id => transport_protocols.id) # FactoryBot.define do - factory :customers_auth, class: CustomersAuth do + factory :customers_auth, class: 'CustomersAuth' do sequence(:name) { |n| "customers_auth_#{n}" } diversion_policy_id { 1 } dump_level_id { 1 } diff --git a/spec/factories/dialpeer_next_rates.rb b/spec/factories/dialpeer_next_rates.rb index 93dbee2a0..7271b718e 100644 --- a/spec/factories/dialpeer_next_rates.rb +++ b/spec/factories/dialpeer_next_rates.rb @@ -26,7 +26,7 @@ # dialpeer_next_rates_dialpeer_id_fkey (dialpeer_id => dialpeers.id) # FactoryBot.define do - factory :dialpeer_next_rate do + factory :dialpeer_next_rate, class: 'DialpeerNextRate' do initial_rate { 0 } next_rate { 0 } initial_interval { 5 } diff --git a/spec/factories/dialpeers.rb b/spec/factories/dialpeers.rb index 91b642046..660de52f8 100644 --- a/spec/factories/dialpeers.rb +++ b/spec/factories/dialpeers.rb @@ -65,7 +65,7 @@ # dialpeers_vendor_id_fkey (vendor_id => contractors.id) # FactoryBot.define do - factory :dialpeer, class: Dialpeer do + factory :dialpeer, class: 'Dialpeer' do sequence(:external_id) enabled { true } reverse_billing { false } diff --git a/spec/factories/disconnect_codes.rb b/spec/factories/disconnect_codes.rb index 27167e742..198d282dc 100644 --- a/spec/factories/disconnect_codes.rb +++ b/spec/factories/disconnect_codes.rb @@ -27,7 +27,7 @@ # FactoryBot.define do - factory :disconnect_code, class: DisconnectCode do + factory :disconnect_code, class: 'DisconnectCode' do id { (DisconnectCode.pick(Arel.sql('MAX(id)')) || 0) + 1 } # broken sequence in class4.sql sequence(:code, 100) { |n| n } sequence(:reason, 100) { |n| "reason_#{n}" } diff --git a/spec/factories/disconnect_policy.rb b/spec/factories/disconnect_policy.rb index 49064a33c..4466c0d7c 100644 --- a/spec/factories/disconnect_policy.rb +++ b/spec/factories/disconnect_policy.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :disconnect_policy, class: DisconnectPolicy do + factory :disconnect_policy, class: 'DisconnectPolicy' do sequence(:name) { |n| "disconnect_policy#{n}" } trait :filled do diff --git a/spec/factories/disconnect_policy_code.rb b/spec/factories/disconnect_policy_code.rb index 794174171..37e8de444 100644 --- a/spec/factories/disconnect_policy_code.rb +++ b/spec/factories/disconnect_policy_code.rb @@ -19,7 +19,7 @@ # FactoryBot.define do - factory :disconnect_policy_code, class: DisconnectPolicyCode do + factory :disconnect_policy_code, class: 'DisconnectPolicyCode' do policy { DisconnectPolicy.take || create(:disconnect_policy) } code { DisconnectCode.take! } end diff --git a/spec/factories/equipment/radius/accounting_profile_start_attributes.rb b/spec/factories/equipment/radius/accounting_profile_start_attributes.rb index fbb856f4b..ec66afa39 100644 --- a/spec/factories/equipment/radius/accounting_profile_start_attributes.rb +++ b/spec/factories/equipment/radius/accounting_profile_start_attributes.rb @@ -20,7 +20,7 @@ # FactoryBot.define do - factory :accounting_profile_start_attribute, class: Equipment::Radius::AccountingProfileStartAttribute do + factory :accounting_profile_start_attribute, class: 'Equipment::Radius::AccountingProfileStartAttribute' do association :profile, factory: :accounting_profile type_id { 1 } sequence(:name) { |n| "accounting_profile_start_#{n}" } diff --git a/spec/factories/equipment/radius/accounting_profile_stop_attributes.rb b/spec/factories/equipment/radius/accounting_profile_stop_attributes.rb index a4c99d675..19398961d 100644 --- a/spec/factories/equipment/radius/accounting_profile_stop_attributes.rb +++ b/spec/factories/equipment/radius/accounting_profile_stop_attributes.rb @@ -20,7 +20,7 @@ # FactoryBot.define do - factory :accounting_profile_stop_attribute, class: Equipment::Radius::AccountingProfileStopAttribute do + factory :accounting_profile_stop_attribute, class: 'Equipment::Radius::AccountingProfileStopAttribute' do association :profile, factory: :accounting_profile type_id { 1 } sequence(:name) { |n| "accounting_profile_stop_#{n}" } diff --git a/spec/factories/equipment/radius/accounting_profiles.rb b/spec/factories/equipment/radius/accounting_profiles.rb index d3c790eff..4e967bf3e 100644 --- a/spec/factories/equipment/radius/accounting_profiles.rb +++ b/spec/factories/equipment/radius/accounting_profiles.rb @@ -21,7 +21,7 @@ # radius_accounting_profiles_name_key (name) UNIQUE # FactoryBot.define do - factory :accounting_profile, class: Equipment::Radius::AccountingProfile do + factory :accounting_profile, class: 'Equipment::Radius::AccountingProfile' do sequence(:name) { |n| "profile#{n}" } server { 'server' } port { '1' } diff --git a/spec/factories/equipment/radius/auth_profiles.rb b/spec/factories/equipment/radius/auth_profiles.rb index 7cd55f00e..b7c59f435 100644 --- a/spec/factories/equipment/radius/auth_profiles.rb +++ b/spec/factories/equipment/radius/auth_profiles.rb @@ -18,7 +18,7 @@ # radius_auth_profiles_name_key (name) UNIQUE # FactoryBot.define do - factory :auth_profile, class: Equipment::Radius::AuthProfile do + factory :auth_profile, class: 'Equipment::Radius::AuthProfile' do sequence(:name) { |n| "auth_profile#{n}" } server { 'server' } port { '1' } diff --git a/spec/factories/equipment/registrations.rb b/spec/factories/equipment/registrations.rb index b2d465fe4..05ff909be 100644 --- a/spec/factories/equipment/registrations.rb +++ b/spec/factories/equipment/registrations.rb @@ -37,7 +37,7 @@ # registrations_transport_protocol_id_fkey (transport_protocol_id => transport_protocols.id) # FactoryBot.define do - factory :registration, class: Equipment::Registration do + factory :registration, class: 'Equipment::Registration' do sequence(:name) { |n| "Equipment Registration #{n}" } domain { 'localhost' } username { 'user name' } diff --git a/spec/factories/equipment/sip_options_probers.rb b/spec/factories/equipment/sip_options_probers.rb index 7941a00e8..d1eee4909 100644 --- a/spec/factories/equipment/sip_options_probers.rb +++ b/spec/factories/equipment/sip_options_probers.rb @@ -40,7 +40,7 @@ # sip_options_probers_transport_protocol_id_fkey (transport_protocol_id => transport_protocols.id) # FactoryBot.define do - factory :sip_options_prober, class: Equipment::SipOptionsProber do + factory :sip_options_prober, class: 'Equipment::SipOptionsProber' do sequence(:name) { |n| "SIP Options Prober #{n}" } sequence(:ruri_domain) { |n| "#{n}.sip.com" } sequence(:ruri_username) { |n| "username_#{n}" } diff --git a/spec/factories/equipment/stir_shaken/signing_certificates.rb b/spec/factories/equipment/stir_shaken/signing_certificates.rb index b31c256e1..6fcbc39c1 100644 --- a/spec/factories/equipment/stir_shaken/signing_certificates.rb +++ b/spec/factories/equipment/stir_shaken/signing_certificates.rb @@ -12,7 +12,7 @@ # updated_at :timestamptz # FactoryBot.define do - factory :stir_shaken_signing_certificate, class: Equipment::StirShaken::SigningCertificate do + factory :stir_shaken_signing_certificate, class: 'Equipment::StirShaken::SigningCertificate' do sequence(:name) { |n| "test_#{n}" } sequence(:certificate) { |n| "----BEGIN CERTIFICATE----\n test_#{n}\n----END CERTIFICATE----" } sequence(:key) { |n| "----BEGIN PRIVATE KEY----\n test_#{n}\n----END PRIVATE KEY----" } diff --git a/spec/factories/equipment/stir_shaken/trusted_certificates.rb b/spec/factories/equipment/stir_shaken/trusted_certificates.rb index 5c6131e8a..3653291ec 100644 --- a/spec/factories/equipment/stir_shaken/trusted_certificates.rb +++ b/spec/factories/equipment/stir_shaken/trusted_certificates.rb @@ -10,7 +10,7 @@ # updated_at :timestamptz # FactoryBot.define do - factory :stir_shaken_trusted_certificate, class: Equipment::StirShaken::TrustedCertificate do + factory :stir_shaken_trusted_certificate, class: 'Equipment::StirShaken::TrustedCertificate' do sequence(:name) { |n| "test_#{n}" } sequence(:certificate) { |n| "----BEGIN CERTIFICATE----\n test_#{n}\n----END CERTIFICATE----" } updated_at { Time.now.utc.change(usec: 0) } diff --git a/spec/factories/equipment/stir_shaken/trusted_repositories.rb b/spec/factories/equipment/stir_shaken/trusted_repositories.rb index 4ac957b00..09b98bfff 100644 --- a/spec/factories/equipment/stir_shaken/trusted_repositories.rb +++ b/spec/factories/equipment/stir_shaken/trusted_repositories.rb @@ -10,7 +10,7 @@ # updated_at :timestamptz # FactoryBot.define do - factory :stir_shaken_trusted_repository, class: Equipment::StirShaken::TrustedRepository do + factory :stir_shaken_trusted_repository, class: 'Equipment::StirShaken::TrustedRepository' do sequence(:url_pattern) { |n| "https://test_#{n}" } validate_https_certificate { true } updated_at { Time.now.utc.change(usec: 0) } diff --git a/spec/factories/events.rb b/spec/factories/events.rb index 71973e483..a39bdce3b 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -18,7 +18,7 @@ # FactoryBot.define do - factory :event, class: Event do + factory :event, class: 'Event' do command { 'reload_registrations' } retries { 5 } node diff --git a/spec/factories/gateway_groups.rb b/spec/factories/gateway_groups.rb index 46d537d6b..6a16cb382 100644 --- a/spec/factories/gateway_groups.rb +++ b/spec/factories/gateway_groups.rb @@ -21,7 +21,7 @@ # gateway_groups_contractor_id_fkey (vendor_id => contractors.id) # FactoryBot.define do - factory :gateway_group, class: GatewayGroup do + factory :gateway_group, class: 'GatewayGroup' do sequence(:name) { |n| "gateway_group_#{n}" } balancing_mode_id { 2 } association :vendor, factory: :contractor, vendor: true diff --git a/spec/factories/gateways.rb b/spec/factories/gateways.rb index 521badd43..2a51ed6b0 100644 --- a/spec/factories/gateways.rb +++ b/spec/factories/gateways.rb @@ -166,7 +166,7 @@ # gateways_tx_inband_dtmf_filtering_mode_id_fkey (tx_inband_dtmf_filtering_mode_id => gateway_inband_dtmf_filtering_modes.id) # FactoryBot.define do - factory :gateway, class: Gateway do + factory :gateway, class: 'Gateway' do sequence(:name) { |n| "gateway#{n}" } enabled { true } priority { 122 } diff --git a/spec/factories/gateways_stats.rb b/spec/factories/gateways_stats.rb index b1a76cf83..4765a1a9b 100644 --- a/spec/factories/gateways_stats.rb +++ b/spec/factories/gateways_stats.rb @@ -22,7 +22,7 @@ # unique_gw (gateway_id) UNIQUE # FactoryBot.define do - factory :gateways_stat, class: GatewaysStat do + factory :gateways_stat, class: 'GatewaysStat' do gateway created_at { Time.now.utc } updated_at { 1.hour.ago.utc } diff --git a/spec/factories/importing/accounts.rb b/spec/factories/importing/accounts.rb index cbbc9ee3f..40b55f1f7 100644 --- a/spec/factories/importing/accounts.rb +++ b/spec/factories/importing/accounts.rb @@ -26,7 +26,7 @@ # o_id :integer(4) # FactoryBot.define do - factory :importing_account, class: Importing::Account do + factory :importing_account, class: 'Importing::Account' do o_id { nil } name { nil } contractor_name { nil } diff --git a/spec/factories/importing/contractors.rb b/spec/factories/importing/contractors.rb index 0a4327c62..fc7ce2978 100644 --- a/spec/factories/importing/contractors.rb +++ b/spec/factories/importing/contractors.rb @@ -19,7 +19,7 @@ # smtp_connection_id :integer(4) # FactoryBot.define do - factory :importing_contractor, class: Importing::Contractor do + factory :importing_contractor, class: 'Importing::Contractor' do o_id { nil } error_string { nil } diff --git a/spec/factories/importing/customers_auths.rb b/spec/factories/importing/customers_auths.rb index e1cb8e130..43630f382 100644 --- a/spec/factories/importing/customers_auths.rb +++ b/spec/factories/importing/customers_auths.rb @@ -85,7 +85,7 @@ # transport_protocol_id :integer(2) # FactoryBot.define do - factory :importing_customers_auth, class: Importing::CustomersAuth do + factory :importing_customers_auth, class: 'Importing::CustomersAuth' do transient do _tag_action { Routing::TagAction.last } _routing_tags { create_list(:routing_tag, 2) } diff --git a/spec/factories/importing/destinations.rb b/spec/factories/importing/destinations.rb index 7da9b496e..47f582b3b 100644 --- a/spec/factories/importing/destinations.rb +++ b/spec/factories/importing/destinations.rb @@ -40,7 +40,7 @@ # routing_tag_mode_id :integer(2) # FactoryBot.define do - factory :importing_destination, class: Importing::Destination do + factory :importing_destination, class: 'Importing::Destination' do transient do _tags { create_list(:routing_tag, 2) } end diff --git a/spec/factories/importing/dialpeers.rb b/spec/factories/importing/dialpeers.rb index 0808d1120..98f1020d1 100644 --- a/spec/factories/importing/dialpeers.rb +++ b/spec/factories/importing/dialpeers.rb @@ -53,7 +53,7 @@ # vendor_id :integer(4) # FactoryBot.define do - factory :importing_dialpeer, class: Importing::Dialpeer do + factory :importing_dialpeer, class: 'Importing::Dialpeer' do transient do _tags { create_list(:routing_tag, 2) } end diff --git a/spec/factories/importing/disconnect_policies.rb b/spec/factories/importing/disconnect_policies.rb index a20502dfe..bd6c6a987 100644 --- a/spec/factories/importing/disconnect_policies.rb +++ b/spec/factories/importing/disconnect_policies.rb @@ -11,7 +11,7 @@ # o_id :integer(4) # FactoryBot.define do - factory :importing_disconnect_policy, class: Importing::DisconnectPolicy do + factory :importing_disconnect_policy, class: 'Importing::DisconnectPolicy' do o_id { nil } name { nil } error_string { nil } diff --git a/spec/factories/importing/gateway_groups.rb b/spec/factories/importing/gateway_groups.rb index db14c3c08..e62b6d659 100644 --- a/spec/factories/importing/gateway_groups.rb +++ b/spec/factories/importing/gateway_groups.rb @@ -16,7 +16,7 @@ # vendor_id :integer(4) # FactoryBot.define do - factory :importing_gateway_group, class: Importing::GatewayGroup do + factory :importing_gateway_group, class: 'Importing::GatewayGroup' do o_id { nil } name { nil } vendor_name { nil } diff --git a/spec/factories/importing/gateways.rb b/spec/factories/importing/gateways.rb index bc5a59704..c203f2614 100644 --- a/spec/factories/importing/gateways.rb +++ b/spec/factories/importing/gateways.rb @@ -146,7 +146,7 @@ # tx_inband_dtmf_filtering_mode_id :integer(2) # FactoryBot.define do - factory :importing_gateway, class: Importing::Gateway do + factory :importing_gateway, class: 'Importing::Gateway' do o_id { nil } host { nil } port { nil } diff --git a/spec/factories/importing/numberlist_items.rb b/spec/factories/importing/numberlist_items.rb index 543852764..26bf85ad4 100644 --- a/spec/factories/importing/numberlist_items.rb +++ b/spec/factories/importing/numberlist_items.rb @@ -27,7 +27,7 @@ # tag_action_id :integer(4) # FactoryBot.define do - factory :importing_numberlist_item, class: Importing::NumberlistItem do + factory :importing_numberlist_item, class: 'Importing::NumberlistItem' do transient do _numberlist { Routing::Numberlist.take || create(:numberlist) } _action_id { Routing::NumberlistItem::ACTION_REJECT } diff --git a/spec/factories/importing/numberlists.rb b/spec/factories/importing/numberlists.rb index bbb0d53b1..fbc664c42 100644 --- a/spec/factories/importing/numberlists.rb +++ b/spec/factories/importing/numberlists.rb @@ -25,7 +25,7 @@ # tag_action_id :integer(4) # FactoryBot.define do - factory :importing_numberlist, class: Importing::Numberlist do + factory :importing_numberlist, class: 'Importing::Numberlist' do transient do _mode_id { Routing::Numberlist::MODE_STRICT } _mode_name { Routing::Numberlist::MODES[Routing::Numberlist::MODE_STRICT] } diff --git a/spec/factories/importing/rateplans.rb b/spec/factories/importing/rateplans.rb index a2a9724d8..53c91bec0 100644 --- a/spec/factories/importing/rateplans.rb +++ b/spec/factories/importing/rateplans.rb @@ -13,7 +13,7 @@ # profit_control_mode_id :integer(4) # FactoryBot.define do - factory :importing_rateplan, class: Importing::Rateplan do + factory :importing_rateplan, class: 'Importing::Rateplan' do o_id { nil } error_string { nil } diff --git a/spec/factories/importing/registrations.rb b/spec/factories/importing/registrations.rb index 48600b421..8f30232dd 100644 --- a/spec/factories/importing/registrations.rb +++ b/spec/factories/importing/registrations.rb @@ -33,7 +33,7 @@ # transport_protocol_id :integer(2) # FactoryBot.define do - factory :importing_registration, class: Importing::Registration do + factory :importing_registration, class: 'Importing::Registration' do o_id { nil } name { nil } enabled { true } diff --git a/spec/factories/importing/routing_groups.rb b/spec/factories/importing/routing_groups.rb index a97507b88..ee1319d99 100644 --- a/spec/factories/importing/routing_groups.rb +++ b/spec/factories/importing/routing_groups.rb @@ -11,7 +11,7 @@ # o_id :integer(4) # FactoryBot.define do - factory :importing_routing_group, class: Importing::RoutingGroup do + factory :importing_routing_group, class: 'Importing::RoutingGroup' do o_id { nil } name { nil } error_string { nil } diff --git a/spec/factories/importing/routing_tag_detection_rules.rb b/spec/factories/importing/routing_tag_detection_rules.rb index 5dd27f05c..61febb4b9 100644 --- a/spec/factories/importing/routing_tag_detection_rules.rb +++ b/spec/factories/importing/routing_tag_detection_rules.rb @@ -34,7 +34,7 @@ # fk_rails_db4b62868c (src_area_id => areas.id) # FactoryBot.define do - factory :importing_routing_tag_detection_rule, class: Importing::RoutingTagDetectionRule do + factory :importing_routing_tag_detection_rule, class: 'Importing::RoutingTagDetectionRule' do transient do _routing_tags { create_list(:routing_tag, 2) } _tag_action { Routing::TagAction.take } diff --git a/spec/factories/incoming_registrations.rb b/spec/factories/incoming_registrations.rb index 9182947d4..e4dae4f1e 100644 --- a/spec/factories/incoming_registrations.rb +++ b/spec/factories/incoming_registrations.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true FactoryBot.define do - factory :incoming_registration, class: RealtimeData::IncomingRegistration do + factory :incoming_registration, class: 'RealtimeData::IncomingRegistration' do trait :filled do auth_id { 123 } contact { 'sip:test@10.255.10.2' } diff --git a/spec/factories/lnp/caches.rb b/spec/factories/lnp/caches.rb index 374deb21b..d2656b3ed 100644 --- a/spec/factories/lnp/caches.rb +++ b/spec/factories/lnp/caches.rb @@ -25,7 +25,7 @@ # FactoryBot.define do - factory :lnp_cache, class: Lnp::Cache do + factory :lnp_cache, class: 'Lnp::Cache' do sequence(:dst) { |n| "dst#{n}" } lrn { 'lrn' } expires_at { Time.now.utc + 200_000 } diff --git a/spec/factories/lnp/databases.rb b/spec/factories/lnp/databases.rb index 913445816..b74770af3 100644 --- a/spec/factories/lnp/databases.rb +++ b/spec/factories/lnp/databases.rb @@ -18,7 +18,7 @@ # FactoryBot.define do - factory :lnp_database, class: Lnp::Database do + factory :lnp_database, class: 'Lnp::Database' do sequence(:name) { |n| "LNP Database #{n}" } cache_ttl { 120 } diff --git a/spec/factories/lnp/routing_plan_lnp_rules.rb b/spec/factories/lnp/routing_plan_lnp_rules.rb index 99602f8aa..e9b7d420f 100644 --- a/spec/factories/lnp/routing_plan_lnp_rules.rb +++ b/spec/factories/lnp/routing_plan_lnp_rules.rb @@ -29,7 +29,7 @@ # FactoryBot.define do - factory :lnp_routing_plan_lnp_rule, class: Lnp::RoutingPlanLnpRule do + factory :lnp_routing_plan_lnp_rule, class: 'Lnp::RoutingPlanLnpRule' do association :routing_plan, factory: :routing_plan database { create(:lnp_database, :thinq) } end diff --git a/spec/factories/log/api_logs.rb b/spec/factories/log/api_logs.rb index 52f5d7d72..4ff5c9b9d 100644 --- a/spec/factories/log/api_logs.rb +++ b/spec/factories/log/api_logs.rb @@ -29,7 +29,7 @@ # FactoryBot.define do - factory :api_log, class: Log::ApiLog do + factory :api_log, class: 'Log::ApiLog' do path { '/api/rest/qweasd' } add_attribute(:method) { 'GET' } status { 204 } diff --git a/spec/factories/log/balance_notifications.rb b/spec/factories/log/balance_notifications.rb index f9c23b9d5..482028a17 100644 --- a/spec/factories/log/balance_notifications.rb +++ b/spec/factories/log/balance_notifications.rb @@ -18,7 +18,7 @@ # FactoryBot.define do - factory :balance_notification, class: Log::BalanceNotification do + factory :balance_notification, class: 'Log::BalanceNotification' do created_at { Time.now.utc } event_id { Log::BalanceNotification::CONST::EVENT_ID_HIGH_THRESHOLD_CLEARED } diff --git a/spec/factories/log/email_logs.rb b/spec/factories/log/email_logs.rb index 169a7e25a..07c5ee9db 100644 --- a/spec/factories/log/email_logs.rb +++ b/spec/factories/log/email_logs.rb @@ -19,7 +19,7 @@ # FactoryBot.define do - factory :email_log, class: Log::EmailLog do + factory :email_log, class: 'Log::EmailLog' do sent_at { Time.now.utc } contact smtp_connection diff --git a/spec/factories/logic_logs.rb b/spec/factories/logic_logs.rb index b30c54192..a848465ee 100644 --- a/spec/factories/logic_logs.rb +++ b/spec/factories/logic_logs.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :logic_log, class: LogicLog do + factory :logic_log, class: 'LogicLog' do source { 'Dialpeer (3)' } level { 0 } msg { 'finished' } diff --git a/spec/factories/nodes.rb b/spec/factories/nodes.rb index ff80b2527..84d382d40 100644 --- a/spec/factories/nodes.rb +++ b/spec/factories/nodes.rb @@ -19,7 +19,7 @@ # node_pop_id_fkey (pop_id => pops.id) # FactoryBot.define do - factory :node, class: Node do + factory :node, class: 'Node' do sequence(:id) { |n| n } sequence(:name) { |n| "Node #{n}" } sequence(:rpc_endpoint) { |n| "127.0.0.1:#{1 + n}" } diff --git a/spec/factories/notification/attachments.rb b/spec/factories/notification/attachments.rb index 32866e599..007a4626a 100644 --- a/spec/factories/notification/attachments.rb +++ b/spec/factories/notification/attachments.rb @@ -10,7 +10,7 @@ # FactoryBot.define do - factory :notification_attachment, class: Notification::Attachment do + factory :notification_attachment, class: 'Notification::Attachment' do sequence(:filename) { |n| "some_file#{n}.txt" } sequence(:data) { |n| "some data #{n}" } end diff --git a/spec/factories/outgoing_registrations.rb b/spec/factories/outgoing_registrations.rb index 301262c63..03a9c2096 100644 --- a/spec/factories/outgoing_registrations.rb +++ b/spec/factories/outgoing_registrations.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true FactoryBot.define do - factory :outgoing_registration, class: RealtimeData::OutgoingRegistration do + factory :outgoing_registration, class: 'RealtimeData::OutgoingRegistration' do trait :filled do sequence(:id, 1_000) domain { 'qwe.asd.com' } diff --git a/spec/factories/payments.rb b/spec/factories/payments.rb index 71870434b..39999c51a 100644 --- a/spec/factories/payments.rb +++ b/spec/factories/payments.rb @@ -24,7 +24,7 @@ # payments_account_id_fkey (account_id => accounts.id) # FactoryBot.define do - factory :payment, class: Payment do + factory :payment, class: 'Payment' do amount { 10 } association :account notes { 'notes text' } diff --git a/spec/factories/pops.rb b/spec/factories/pops.rb index 80b696175..b486ab6e3 100644 --- a/spec/factories/pops.rb +++ b/spec/factories/pops.rb @@ -12,7 +12,7 @@ # pop_name_key (name) UNIQUE # FactoryBot.define do - factory :pop, class: Pop do + factory :pop, class: 'Pop' do sequence(:id) { |n| n } sequence(:name) { |n| "Point of presence #{n}" } diff --git a/spec/factories/realtime_sip_options_probers.rb b/spec/factories/realtime_sip_options_probers.rb index 6e97d46c1..82d027e93 100644 --- a/spec/factories/realtime_sip_options_probers.rb +++ b/spec/factories/realtime_sip_options_probers.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true FactoryBot.define do - factory :realtime_sip_options_prober, class: RealtimeData::SipOptionsProber do + factory :realtime_sip_options_prober, class: 'RealtimeData::SipOptionsProber' do trait :filled do sequence(:id) { |n| n } sequence(:node_id) { |n| n } diff --git a/spec/factories/report/custom_cdr_schedulers.rb b/spec/factories/report/custom_cdr_schedulers.rb index 563fb147b..38d1cab27 100644 --- a/spec/factories/report/custom_cdr_schedulers.rb +++ b/spec/factories/report/custom_cdr_schedulers.rb @@ -20,7 +20,7 @@ # FactoryBot.define do - factory :custom_cdr_scheduler, class: Report::CustomCdrScheduler do + factory :custom_cdr_scheduler, class: 'Report::CustomCdrScheduler' do period { Report::SchedulerPeriod.take || build(:period_scheduler) } group_by { %w[customer_id rateplan_id] } diff --git a/spec/factories/report/custom_cdrs.rb b/spec/factories/report/custom_cdrs.rb index f27e7dc6b..8f60d5566 100644 --- a/spec/factories/report/custom_cdrs.rb +++ b/spec/factories/report/custom_cdrs.rb @@ -16,7 +16,7 @@ # FactoryBot.define do - factory :custom_cdr, class: Report::CustomCdr do + factory :custom_cdr, class: 'Report::CustomCdr' do date_start { Time.now.utc } date_end { Time.now.utc + 1.week } group_by { %w[customer_id rateplan_id] } diff --git a/spec/factories/report/custom_data.rb b/spec/factories/report/custom_data.rb index a86a33185..d3ab48b19 100644 --- a/spec/factories/report/custom_data.rb +++ b/spec/factories/report/custom_data.rb @@ -98,7 +98,7 @@ # cdr_custom_report_data_report_id_fkey (report_id => cdr_custom_report.id) # FactoryBot.define do - factory :custom_data, class: Report::CustomData do + factory :custom_data, class: 'Report::CustomData' do report { association :interval_cdr } end end diff --git a/spec/factories/report/customer_traffic_schedulers.rb b/spec/factories/report/customer_traffic_schedulers.rb index 9c5495385..5d9d838d1 100644 --- a/spec/factories/report/customer_traffic_schedulers.rb +++ b/spec/factories/report/customer_traffic_schedulers.rb @@ -18,7 +18,7 @@ # FactoryBot.define do - factory :customer_traffic_scheduler, class: Report::CustomerTrafficScheduler do + factory :customer_traffic_scheduler, class: 'Report::CustomerTrafficScheduler' do period { Report::SchedulerPeriod.take || build(:period_scheduler) } association :customer end diff --git a/spec/factories/report/customer_traffics.rb b/spec/factories/report/customer_traffics.rb index 434d897ad..3133c6a7a 100644 --- a/spec/factories/report/customer_traffics.rb +++ b/spec/factories/report/customer_traffics.rb @@ -14,7 +14,7 @@ # FactoryBot.define do - factory :customer_traffic, class: Report::CustomerTraffic do + factory :customer_traffic, class: 'Report::CustomerTraffic' do date_start { Time.now.utc } date_end { Time.now.utc + 1.week } diff --git a/spec/factories/report/interval_cdr_schedulers.rb b/spec/factories/report/interval_cdr_schedulers.rb index 6a8af1eba..8ed365924 100644 --- a/spec/factories/report/interval_cdr_schedulers.rb +++ b/spec/factories/report/interval_cdr_schedulers.rb @@ -22,7 +22,7 @@ # FactoryBot.define do - factory :interval_cdr_scheduler, class: Report::IntervalCdrScheduler do + factory :interval_cdr_scheduler, class: 'Report::IntervalCdrScheduler' do period { Report::SchedulerPeriod.take || build(:period_scheduler) } group_by { %w[customer_acc_id] } interval_length { 5 } diff --git a/spec/factories/report/interval_cdrs.rb b/spec/factories/report/interval_cdrs.rb index 91aef425c..2a415c209 100644 --- a/spec/factories/report/interval_cdrs.rb +++ b/spec/factories/report/interval_cdrs.rb @@ -22,7 +22,7 @@ # FactoryBot.define do - factory :interval_cdr, class: Report::IntervalCdr do + factory :interval_cdr, class: 'Report::IntervalCdr' do date_start { Time.now.utc } date_end { Time.now.utc + 1.week } interval_length { 10 } diff --git a/spec/factories/report/interval_data.rb b/spec/factories/report/interval_data.rb index ba2fe88a1..055f18dc0 100644 --- a/spec/factories/report/interval_data.rb +++ b/spec/factories/report/interval_data.rb @@ -88,7 +88,7 @@ # cdr_interval_report_data_report_id_fkey (report_id => cdr_interval_report.id) # FactoryBot.define do - factory :interval_data, class: Report::IntervalData do + factory :interval_data, class: 'Report::IntervalData' do report { association :interval_cdr } disconnect_initiator_id { 1 } end diff --git a/spec/factories/report/realtime/bad_routings.rb b/spec/factories/report/realtime/bad_routings.rb index fba603147..8ea380285 100644 --- a/spec/factories/report/realtime/bad_routings.rb +++ b/spec/factories/report/realtime/bad_routings.rb @@ -157,7 +157,7 @@ # cdr_vendor_id_time_start_idx (vendor_id,time_start) # FactoryBot.define do - factory :bad_routing, class: Report::Realtime::BadRouting, parent: :cdr do + factory :bad_routing, class: 'Report::Realtime::BadRouting', parent: :cdr do time_start { 110.seconds.ago } # this record will be available in page during 10 second disconnect_initiator_id { Cdr::Cdr::DISCONNECT_INITIATOR_ROUTING } association :customer_auth, factory: :customers_auth diff --git a/spec/factories/report/realtime/not_authenticateds.rb b/spec/factories/report/realtime/not_authenticateds.rb index 2db996937..8909b5cd0 100644 --- a/spec/factories/report/realtime/not_authenticateds.rb +++ b/spec/factories/report/realtime/not_authenticateds.rb @@ -157,7 +157,7 @@ # cdr_vendor_id_time_start_idx (vendor_id,time_start) # FactoryBot.define do - factory :not_authenticated, class: Report::Realtime::NotAuthenticated, parent: :cdr do + factory :not_authenticated, class: 'Report::Realtime::NotAuthenticated', parent: :cdr do time_start { 110.seconds.ago.utc } # this record will be available in page during 10 second auth_orig_ip { IPAddr.new(rand(2**32), Socket::AF_INET) } customer_auth_id { nil } diff --git a/spec/factories/report/scheduler_periods.rb b/spec/factories/report/scheduler_periods.rb index 05e7abb24..e76fbcb67 100644 --- a/spec/factories/report/scheduler_periods.rb +++ b/spec/factories/report/scheduler_periods.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :period_scheduler, class: Report::SchedulerPeriod do + factory :period_scheduler, class: 'Report::SchedulerPeriod' do sequence(:id, &:n) sequence(:name) { |n| "Period Scheduler #{n}" } end diff --git a/spec/factories/report/vendor_traffic_schedulers.rb b/spec/factories/report/vendor_traffic_schedulers.rb index 2a8c356b4..55f2a38ee 100644 --- a/spec/factories/report/vendor_traffic_schedulers.rb +++ b/spec/factories/report/vendor_traffic_schedulers.rb @@ -18,7 +18,7 @@ # FactoryBot.define do - factory :vendor_traffic_scheduler, class: Report::VendorTrafficScheduler do + factory :vendor_traffic_scheduler, class: 'Report::VendorTrafficScheduler' do period { Report::SchedulerPeriod.take } vendor end diff --git a/spec/factories/report/vendor_traffics.rb b/spec/factories/report/vendor_traffics.rb index 375c65274..63fa497e0 100644 --- a/spec/factories/report/vendor_traffics.rb +++ b/spec/factories/report/vendor_traffics.rb @@ -14,7 +14,7 @@ # FactoryBot.define do - factory :vendor_traffic, class: Report::VendorTraffic do + factory :vendor_traffic, class: 'Report::VendorTraffic' do date_start { Time.now.utc } date_end { Time.now.utc + 1.week } association :vendor diff --git a/spec/factories/routing/area_prefixes.rb b/spec/factories/routing/area_prefixes.rb index 07262ba39..a39ab4189 100644 --- a/spec/factories/routing/area_prefixes.rb +++ b/spec/factories/routing/area_prefixes.rb @@ -17,7 +17,7 @@ # area_prefixes_area_id_fkey (area_id => areas.id) # FactoryBot.define do - factory :area_prefix, class: Routing::AreaPrefix do + factory :area_prefix, class: 'Routing::AreaPrefix' do sequence(:prefix) { |n| "#{n}#{n + 1}#{n + 2}" } # example: '123', '234'... association :area diff --git a/spec/factories/routing/areas.rb b/spec/factories/routing/areas.rb index 2ee413553..cab861c7f 100644 --- a/spec/factories/routing/areas.rb +++ b/spec/factories/routing/areas.rb @@ -12,7 +12,7 @@ # areas_name_key (name) UNIQUE # FactoryBot.define do - factory :area, class: Routing::Area do + factory :area, class: 'Routing::Area' do sequence(:name) { |n| "Routing_Area_#{n}" } trait :filled do diff --git a/spec/factories/routing/destination_next_rates.rb b/spec/factories/routing/destination_next_rates.rb index e722f6d26..f01c3ee2a 100644 --- a/spec/factories/routing/destination_next_rates.rb +++ b/spec/factories/routing/destination_next_rates.rb @@ -22,7 +22,7 @@ # destination_next_rates_destination_id_fkey (destination_id => destinations.id) # FactoryBot.define do - factory :destination_next_rate, class: Routing::DestinationNextRate do + factory :destination_next_rate, class: 'Routing::DestinationNextRate' do initial_rate { 0 } next_rate { 0 } initial_interval { 5 } diff --git a/spec/factories/routing/destinations.rb b/spec/factories/routing/destinations.rb index eff41e6a5..f0d563e09 100644 --- a/spec/factories/routing/destinations.rb +++ b/spec/factories/routing/destinations.rb @@ -46,7 +46,7 @@ # destinations_routing_tag_mode_id_fkey (routing_tag_mode_id => routing_tag_modes.id) # FactoryBot.define do - factory :destination, aliases: [:rate], class: Routing::Destination do + factory :destination, aliases: [:rate], class: 'Routing::Destination' do sequence(:external_id) prefix { nil } connect_fee { 0 } diff --git a/spec/factories/routing/numberlist_items.rb b/spec/factories/routing/numberlist_items.rb index 37814536a..1a7369003 100644 --- a/spec/factories/routing/numberlist_items.rb +++ b/spec/factories/routing/numberlist_items.rb @@ -34,7 +34,7 @@ # numberlist_items_tag_action_id_fkey (tag_action_id => tag_actions.id) # FactoryBot.define do - factory :numberlist_item, class: Routing::NumberlistItem do + factory :numberlist_item, class: 'Routing::NumberlistItem' do sequence(:key) { |n| "numberlist_item_#{n}" } association :numberlist diff --git a/spec/factories/routing/numberlists.rb b/spec/factories/routing/numberlists.rb index b52ae776e..718934e36 100644 --- a/spec/factories/routing/numberlists.rb +++ b/spec/factories/routing/numberlists.rb @@ -34,7 +34,7 @@ # numberlists_tag_action_id_fkey (tag_action_id => tag_actions.id) # FactoryBot.define do - factory :numberlist, class: Routing::Numberlist do + factory :numberlist, class: 'Routing::Numberlist' do sequence(:name) { |n| "numberlist#{n}" } association :lua_script diff --git a/spec/factories/routing/rate_groups.rb b/spec/factories/routing/rate_groups.rb index a7089f20f..a32b15aa6 100644 --- a/spec/factories/routing/rate_groups.rb +++ b/spec/factories/routing/rate_groups.rb @@ -14,7 +14,7 @@ # rate_groups_name_key (name) UNIQUE # FactoryBot.define do - factory :rate_group, class: Routing::RateGroup do + factory :rate_group, class: 'Routing::RateGroup' do sequence(:name) { |n| "rateplan#{n}" } sequence(:external_id) diff --git a/spec/factories/routing/rateplans.rb b/spec/factories/routing/rateplans.rb index 2905e5c25..b4186d11d 100644 --- a/spec/factories/routing/rateplans.rb +++ b/spec/factories/routing/rateplans.rb @@ -18,7 +18,7 @@ # rateplans_uuid_key (uuid) UNIQUE # FactoryBot.define do - factory :rateplan, class: Routing::Rateplan do + factory :rateplan, class: 'Routing::Rateplan' do sequence(:name) { |n| "rateplan#{n}" } profit_control_mode_id { Routing::RateProfitControlMode::MODE_PER_CALL } diff --git a/spec/factories/routing/routeset_discriminators.rb b/spec/factories/routing/routeset_discriminators.rb index 52c7ef6f6..f0d459913 100644 --- a/spec/factories/routing/routeset_discriminators.rb +++ b/spec/factories/routing/routeset_discriminators.rb @@ -12,7 +12,7 @@ # routeset_discriminators_name_key (name) UNIQUE # FactoryBot.define do - factory :routeset_discriminator, class: Routing::RoutesetDiscriminator do + factory :routeset_discriminator, class: 'Routing::RoutesetDiscriminator' do sequence(:name) { |n| "Discriminator #{n}" } end end diff --git a/spec/factories/routing/routing_groups.rb b/spec/factories/routing/routing_groups.rb index 3ba764e48..6b7969095 100644 --- a/spec/factories/routing/routing_groups.rb +++ b/spec/factories/routing/routing_groups.rb @@ -12,7 +12,7 @@ # routing_groups_name_unique (name) UNIQUE # FactoryBot.define do - factory :routing_group, class: Routing::RoutingGroup do + factory :routing_group, class: 'Routing::RoutingGroup' do sequence(:name) { |n| "routing_group_#{n}" } trait :with_dialpeers do diff --git a/spec/factories/routing/routing_plan_static_routes.rb b/spec/factories/routing/routing_plan_static_routes.rb index 5397e42a2..b782c70a1 100644 --- a/spec/factories/routing/routing_plan_static_routes.rb +++ b/spec/factories/routing/routing_plan_static_routes.rb @@ -23,7 +23,7 @@ # routing_plan_static_routes_vendor_id_fkey (vendor_id => contractors.id) # FactoryBot.define do - factory :routing_plan_static_route, aliases: [:static_route], class: Routing::RoutingPlanStaticRoute do + factory :routing_plan_static_route, aliases: [:static_route], class: 'Routing::RoutingPlanStaticRoute' do prefix { '' } routing_plan { create :routing_plan, :with_static_routes } vendor { FactoryBot.create :vendor } diff --git a/spec/factories/routing/routing_plans.rb b/spec/factories/routing/routing_plans.rb index d627233a8..aa2e2fe9b 100644 --- a/spec/factories/routing/routing_plans.rb +++ b/spec/factories/routing/routing_plans.rb @@ -31,7 +31,7 @@ # routing_plans_src_numberlist_id_fkey (src_numberlist_id => numberlists.id) # FactoryBot.define do - factory :routing_plan, class: Routing::RoutingPlan do + factory :routing_plan, class: 'Routing::RoutingPlan' do sequence(:name) { |n| "routing_plan_#{n}" } sorting_id { Routing::RoutingPlan::SORTING_LCR_PRIO_CONTROL } rate_delta_max { 0 } diff --git a/spec/factories/routing/routing_tag_detection_rules.rb b/spec/factories/routing/routing_tag_detection_rules.rb index 11d2c8120..1167ac34c 100644 --- a/spec/factories/routing/routing_tag_detection_rules.rb +++ b/spec/factories/routing/routing_tag_detection_rules.rb @@ -27,7 +27,7 @@ # FactoryBot.define do - factory :routing_tag_detection_rule, class: Routing::RoutingTagDetectionRule do + factory :routing_tag_detection_rule, class: 'Routing::RoutingTagDetectionRule' do tag_action { Routing::TagAction.clear_action } trait :filled do diff --git a/spec/factories/routing/routing_tags.rb b/spec/factories/routing/routing_tags.rb index 1647007d9..2e7f8d265 100644 --- a/spec/factories/routing/routing_tags.rb +++ b/spec/factories/routing/routing_tags.rb @@ -12,7 +12,7 @@ # routing_tags_name_key (name) UNIQUE # FactoryBot.define do - factory :routing_tag, class: Routing::RoutingTag do + factory :routing_tag, class: 'Routing::RoutingTag' do sequence(:name) { |n| "TAG_#{n}" } initialize_with { Routing::RoutingTag.find_or_create_by(name: name) } diff --git a/spec/factories/routing/tag_actions.rb b/spec/factories/routing/tag_actions.rb index 5c0982f67..b587bfc17 100644 --- a/spec/factories/routing/tag_actions.rb +++ b/spec/factories/routing/tag_actions.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :tag_action, class: Routing::TagAction do + factory :tag_action, class: 'Routing::TagAction' do sequence(:id) { |n| n } sequence(:name) { |n| "Clear tags #{n}" } end diff --git a/spec/factories/rtp_statistics/rx_streams.rb b/spec/factories/rtp_statistics/rx_streams.rb index 1a48a5f22..ad6c6329e 100644 --- a/spec/factories/rtp_statistics/rx_streams.rb +++ b/spec/factories/rtp_statistics/rx_streams.rb @@ -38,7 +38,7 @@ # tx_stream_id :bigint(8) # FactoryBot.define do - factory :rx_stream, class: RtpStatistics::RxStream do + factory :rx_stream, class: 'RtpStatistics::RxStream' do time_start { 1.minute.ago } time_end { 30.seconds.ago } association :pop diff --git a/spec/factories/rtp_statistics/tx_streams.rb b/spec/factories/rtp_statistics/tx_streams.rb index 9f9858fb6..6b9c7e925 100644 --- a/spec/factories/rtp_statistics/tx_streams.rb +++ b/spec/factories/rtp_statistics/tx_streams.rb @@ -34,7 +34,7 @@ # pop_id :integer(4) # FactoryBot.define do - factory :tx_stream, class: RtpStatistics::TxStream do + factory :tx_stream, class: 'RtpStatistics::TxStream' do time_start { 1.minute.ago } time_end { 30.seconds.ago } association :pop diff --git a/spec/factories/stats/active_call_accounts.rb b/spec/factories/stats/active_call_accounts.rb index 21791c6bd..a8e5c7094 100644 --- a/spec/factories/stats/active_call_accounts.rb +++ b/spec/factories/stats/active_call_accounts.rb @@ -16,7 +16,7 @@ # FactoryBot.define do - factory :active_call_account, class: Stats::ActiveCallAccount do + factory :active_call_account, class: 'Stats::ActiveCallAccount' do terminated_count { 0 } originated_count { 0 } end diff --git a/spec/factories/stats/active_call_orig_gateways.rb b/spec/factories/stats/active_call_orig_gateways.rb index 809ece329..32c575e6a 100644 --- a/spec/factories/stats/active_call_orig_gateways.rb +++ b/spec/factories/stats/active_call_orig_gateways.rb @@ -11,7 +11,7 @@ # FactoryBot.define do - factory :stats_active_call_orig_gw, class: Stats::ActiveCallOrigGateway do + factory :stats_active_call_orig_gw, class: 'Stats::ActiveCallOrigGateway' do count { rand(100) } gateway { Gateway.take! || FactoryBot.create(:gateway) } end diff --git a/spec/factories/stats/active_call_term_gateways.rb b/spec/factories/stats/active_call_term_gateways.rb index 5c1d69ecd..6865d9dbe 100644 --- a/spec/factories/stats/active_call_term_gateways.rb +++ b/spec/factories/stats/active_call_term_gateways.rb @@ -11,7 +11,7 @@ # FactoryBot.define do - factory :stats_active_call_term_gw, class: Stats::ActiveCallTermGateway do + factory :stats_active_call_term_gw, class: 'Stats::ActiveCallTermGateway' do count { rand(100) } gateway { Gateway.take! || FactoryBot.create(:gateway) } end diff --git a/spec/factories/stats/active_calls.rb b/spec/factories/stats/active_calls.rb index dc7bc1a67..ccf6e63c4 100644 --- a/spec/factories/stats/active_calls.rb +++ b/spec/factories/stats/active_calls.rb @@ -11,7 +11,7 @@ # FactoryBot.define do - factory :stats_active_call, class: Stats::ActiveCall do + factory :stats_active_call, class: 'Stats::ActiveCall' do count { rand(100) } node { Node.take! || FactoryBot.create(:node) } end diff --git a/spec/factories/stats/customer_auth_stats.rb b/spec/factories/stats/customer_auth_stats.rb index 5066b8d17..3a0aab377 100644 --- a/spec/factories/stats/customer_auth_stats.rb +++ b/spec/factories/stats/customer_auth_stats.rb @@ -19,7 +19,7 @@ # customer_auth_stats_customer_auth_id_timestamp_idx (customer_auth_id,timestamp) UNIQUE # FactoryBot.define do - factory :customer_auth_stats, class: Stats::CustomerAuthStats do + factory :customer_auth_stats, class: 'Stats::CustomerAuthStats' do calls_count { rand(5) } timestamp { Time.now.utc } diff --git a/spec/factories/stats/termination_quality_stats.rb b/spec/factories/stats/termination_quality_stats.rb index 8d92cac56..2abd5574a 100644 --- a/spec/factories/stats/termination_quality_stats.rb +++ b/spec/factories/stats/termination_quality_stats.rb @@ -21,7 +21,7 @@ # FactoryBot.define do - factory :quality_stat, class: Stats::TerminationQualityStat do + factory :quality_stat, class: 'Stats::TerminationQualityStat' do time_start { Time.now.utc } success { true } duration { 2 } diff --git a/spec/factories/system/api_log_configs.rb b/spec/factories/system/api_log_configs.rb index cb881c874..b353adc0f 100644 --- a/spec/factories/system/api_log_configs.rb +++ b/spec/factories/system/api_log_configs.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :api_log_config, class: System::ApiLogConfig do + factory :api_log_config, class: 'System::ApiLogConfig' do sequence(:controller) { |n| "Api::Rest::Private::RateplansController_#{n}" } end end diff --git a/spec/factories/system/cdr_configs.rb b/spec/factories/system/cdr_configs.rb index ca3cbf54a..f7545cd7a 100644 --- a/spec/factories/system/cdr_configs.rb +++ b/spec/factories/system/cdr_configs.rb @@ -19,7 +19,7 @@ # config_vendor_amount_round_mode_id_fkey (vendor_amount_round_mode_id => sys.amount_round_modes.id) # FactoryBot.define do - factory :cdr_config, class: System::CdrConfig do + factory :cdr_config, class: 'System::CdrConfig' do sequence(:id) { |n| n } call_duration_round_mode { System::CdrRoundMode.take || create(:cdr_round_mode, :always_up) } diff --git a/spec/factories/system/cdr_price_round_modes.rb b/spec/factories/system/cdr_price_round_modes.rb index 36734b7ae..72868d70e 100644 --- a/spec/factories/system/cdr_price_round_modes.rb +++ b/spec/factories/system/cdr_price_round_modes.rb @@ -12,7 +12,7 @@ # amount_round_modes_name_key (name) UNIQUE # FactoryBot.define do - factory :cdr_price_round_mode, class: System::CdrPriceRoundMode do + factory :cdr_price_round_mode, class: 'System::CdrPriceRoundMode' do sequence(:id, &:n) sequence(:name) { |n| "Always UP #{n}" } diff --git a/spec/factories/system/cdr_round_modes.rb b/spec/factories/system/cdr_round_modes.rb index e05f6ac11..fd9b416b5 100644 --- a/spec/factories/system/cdr_round_modes.rb +++ b/spec/factories/system/cdr_round_modes.rb @@ -13,7 +13,7 @@ # FactoryBot.define do - factory :cdr_round_mode, class: System::CdrRoundMode do + factory :cdr_round_mode, class: 'System::CdrRoundMode' do id { 3 } # sequence(:id) { |n| n } sequence(:name) { |n| "Always UP #{n}" } diff --git a/spec/factories/system/countries.rb b/spec/factories/system/countries.rb index 97ea60c88..83de93ddd 100644 --- a/spec/factories/system/countries.rb +++ b/spec/factories/system/countries.rb @@ -13,7 +13,7 @@ # countries_name_key (name) UNIQUE # FactoryBot.define do - factory :country, class: System::Country do + factory :country, class: 'System::Country' do name { 'United States' } iso2 { 'US' } diff --git a/spec/factories/system/event_subscriptions.rb b/spec/factories/system/event_subscriptions.rb index e08b1adbb..d3f9c8148 100644 --- a/spec/factories/system/event_subscriptions.rb +++ b/spec/factories/system/event_subscriptions.rb @@ -15,7 +15,7 @@ # FactoryBot.define do - factory :event_subscription, class: System::EventSubscription do + factory :event_subscription, class: 'System::EventSubscription' do sequence(:event) { |n| "DialpeerLocked #{n}" } end end diff --git a/spec/factories/system/lnp_resolvers.rb b/spec/factories/system/lnp_resolvers.rb index 9ce26b4ab..c023f5cd8 100644 --- a/spec/factories/system/lnp_resolvers.rb +++ b/spec/factories/system/lnp_resolvers.rb @@ -15,7 +15,7 @@ # FactoryBot.define do - factory :lnp_resolver, class: System::LnpResolver do + factory :lnp_resolver, class: 'System::LnpResolver' do sequence(:name) { |n| "test_#{n}" } address { 'example.com' } port { 1234 } diff --git a/spec/factories/system/load_balancers.rb b/spec/factories/system/load_balancers.rb index 92a07da51..ed8d3658e 100644 --- a/spec/factories/system/load_balancers.rb +++ b/spec/factories/system/load_balancers.rb @@ -14,7 +14,7 @@ # load_balancers_signalling_ip_key (signalling_ip) UNIQUE # FactoryBot.define do - factory :system_load_balancer, class: System::LoadBalancer do + factory :system_load_balancer, class: 'System::LoadBalancer' do name { 'TEST BALANCER' } signalling_ip { '1.2.3.4' } diff --git a/spec/factories/system/lua_scripts.rb b/spec/factories/system/lua_scripts.rb index f62999485..85bc5a3a8 100644 --- a/spec/factories/system/lua_scripts.rb +++ b/spec/factories/system/lua_scripts.rb @@ -15,7 +15,7 @@ # lua_scripts_name_key (name) UNIQUE # FactoryBot.define do - factory :lua_script, class: System::LuaScript do + factory :lua_script, class: 'System::LuaScript' do sequence(:name) { |n| "LUA script_#{n}" } source { 'arg.a="000"; table.insert(arg.v,9); return arg;' } diff --git a/spec/factories/system/network_prefixes.rb b/spec/factories/system/network_prefixes.rb index b7ddfcb58..5b0c77976 100644 --- a/spec/factories/system/network_prefixes.rb +++ b/spec/factories/system/network_prefixes.rb @@ -25,7 +25,7 @@ # FactoryBot.define do - factory :network_prefix, class: System::NetworkPrefix do + factory :network_prefix, class: 'System::NetworkPrefix' do # Max prefix length in db/network_prefixes.yml is 12. # To avoid duplication we create prefixes wih length 13+. base_prefix = '1' * 12 diff --git a/spec/factories/system/network_types.rb b/spec/factories/system/network_types.rb index b6f101c8a..6117be22d 100644 --- a/spec/factories/system/network_types.rb +++ b/spec/factories/system/network_types.rb @@ -14,7 +14,7 @@ # network_types_uuid_key (uuid) UNIQUE # FactoryBot.define do - factory :network_type, class: System::NetworkType do + factory :network_type, class: 'System::NetworkType' do sequence(:name) { |n| "Network type #{n}" } uuid { SecureRandom.uuid } diff --git a/spec/factories/system/networks.rb b/spec/factories/system/networks.rb index 975aa34aa..d49a7ef73 100644 --- a/spec/factories/system/networks.rb +++ b/spec/factories/system/networks.rb @@ -19,7 +19,7 @@ # networks_type_id_fkey (type_id => network_types.id) # FactoryBot.define do - factory :network, class: System::Network do + factory :network, class: 'System::Network' do name { 'US Eagle Mobile' } network_type { System::NetworkType.take! } uuid { SecureRandom.uuid } diff --git a/spec/factories/system/sensors.rb b/spec/factories/system/sensors.rb index e420245af..e5781d7a3 100644 --- a/spec/factories/system/sensors.rb +++ b/spec/factories/system/sensors.rb @@ -24,7 +24,7 @@ # sensors_mode_id_fkey (mode_id => sensor_modes.id) # FactoryBot.define do - factory :sensor, class: System::Sensor do + factory :sensor, class: 'System::Sensor' do sequence(:name) { |n| "sensor#{n}" } mode_id { 1 } source_interface { nil } diff --git a/spec/factories/system/smtp_connections.rb b/spec/factories/system/smtp_connections.rb index 79dd0eba9..4356ac140 100644 --- a/spec/factories/system/smtp_connections.rb +++ b/spec/factories/system/smtp_connections.rb @@ -19,7 +19,7 @@ # smtp_connections_name_key (name) UNIQUE # FactoryBot.define do - factory :smtp_connection, class: System::SmtpConnection do + factory :smtp_connection, class: 'System::SmtpConnection' do sequence(:name) { |n| "smtp_connection#{n}" } host { 'host' } port { '25' } diff --git a/spec/factories/system/timezones.rb b/spec/factories/system/timezones.rb index 8a8a88461..fdb250e24 100644 --- a/spec/factories/system/timezones.rb +++ b/spec/factories/system/timezones.rb @@ -15,7 +15,7 @@ # timezones_name_key (name) UNIQUE # FactoryBot.define do - factory :timezone, class: System::Timezone do + factory :timezone, class: 'System::Timezone' do sequence(:name) { |n| "TZ#{n}" } sequence(:abbrev) { |n| "TZ#{n}" } utc_offset { 0 }