Skip to content

Commit c55bc46

Browse files
committed
Fix formatting issues
1 parent e421182 commit c55bc46

5 files changed

Lines changed: 12 additions & 8 deletions

File tree

app/models/authentication_provider.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class AuthenticationProvider < ApplicationRecord
2222
length: { maximum: 255 }
2323

2424
validates :system_name, exclusion: [
25-
RedhatCustomerPortalSupport::RH_CUSTOMER_PORTAL_SYSTEM_NAME,
26-
ServiceDiscovery::AuthenticationProviderSupport::SERVICE_DISCOVERY_SYSTEM_NAME
25+
RedhatCustomerPortalSupport::RH_CUSTOMER_PORTAL_SYSTEM_NAME,
26+
ServiceDiscovery::AuthenticationProviderSupport::SERVICE_DISCOVERY_SYSTEM_NAME
2727
]
2828

2929
before_validation :set_defaults, on: :create
@@ -141,6 +141,7 @@ def self.branded_available?
141141
def verify_valid_kind_for_account_type
142142
my_class = self.class
143143
return if developer? || (provider? && my_class.available(my_class.account_types[:provider]).include?(my_class))
144+
144145
errors.add(:kind, :not_found)
145146
false
146147
end

app/models/invoice.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Invoice < ApplicationRecord
1414
enum :creation_type, { manual: 'manual', background: 'background' }
1515

1616
include AfterCommitQueue
17+
1718
audited
1819
has_associated_audits
1920

@@ -39,6 +40,8 @@ class InvalidInvoiceStateException < RuntimeError; end
3940
has_attached_file :pdf, url: ':url_root/:class/:id/:attachment/:style/:basename.:extension'
4041
do_not_validate_attachment_file_type :pdf
4142

43+
attr_accessible :provider_account, :buyer_account, :friendly_id, :period
44+
4245
validates :provider_account, :buyer_account, :friendly_id, presence: true
4346

4447
validates :period, presence: { :message => 'Billing period format should be YYYY-MM' }

test/test_helpers/use_sidekiq_adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module UsesSidekiqAdapter
24
extend ActiveSupport::Concern
35

test/unit/logic/provider_upgrade_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ def setup
88
@power1M = FactoryBot.create(:published_plan, :system_name => 'power1M', :issuer => service)
99
rule = @power1M.send :plan_rule
1010
rule.stubs(:switches).returns(%i[finance multiple_applications branding require_cc_on_signup
11-
account_plans multiple_users groups]
12-
)
11+
account_plans multiple_users groups]
12+
)
1313
rule.stubs(:limits).returns(PlanRule::Limit.new(max_services: 1, max_users: 1))
1414
rule.stubs(:rank).returns(10)
1515
@pro = FactoryBot.create(:published_plan, :system_name => 'pro3M', :issuer => service)
1616
rule_pro = @pro.send :plan_rule
1717
rule_pro.stubs(:switches).returns(%i[finance multiple_applications branding require_cc_on_signup account_plans
18-
multiple_users groups multiple_services service_plans]
19-
)
18+
multiple_users groups multiple_services service_plans]
19+
)
2020
rule_pro.stubs(:limits).returns(PlanRule::Limit.new(max_services: 3, max_users: 5))
2121
rule_pro.stubs(:rank).returns(19)
2222
@base = FactoryBot.create(:published_plan, :system_name => 'base', :issuer => service)

test/unit/tasks/multitenant/tenants_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ class StaleThrottledDeleteTest < ActiveSupport::TestCase
269269
end
270270

271271
test "jobs scheduled but not yet queued are not taken into account" do
272-
273-
274272
DeleteObjectHierarchyWorker.set(wait: 2.days).perform_later("Plain-Account-#{@provider1.id}")
275273
assert_equal 1, Sidekiq::ScheduledSet.new.to_a.size
276274

0 commit comments

Comments
 (0)