mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Safely autocorrect Layout/MultilineMethodCallIndentation
Inspecting 1479 files
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.......CC......................C..................................................
Offenses:
spec/controllers/api/v0/orders_controller_spec.rb:150:13: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
.map{ |o| o["id"] }
^^^^
spec/system/admin/order_cycles/complex_editing_spec.rb:30:9: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
.to eq(oc.orders_open_at.strftime("%Y-%m-%d %H:%M"))
^^^
spec/system/admin/order_cycles/complex_editing_spec.rb:32:9: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
.to eq(oc.orders_close_at.strftime("%Y-%m-%d %H:%M"))
^^^
spec/system/admin/overview_spec.rb:16:62: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 55) spaces for indenting an expression spanning multiple lines.
.and_return @enterprise_user
^^^^^^^^^^^
spec/system/admin/payment_method_spec.rb:62:22: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 13) spaces for indenting an expression spanning multiple lines.
.to_return(body: JSON.generate(stripe_account_mock))
^^^^^^^^^^
spec/system/admin/variant_overrides_spec.rb:214:64: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 51) spaces for indenting an expression spanning multiple lines.
.and_return(build(:user))
^^^^^^^^^^^
1479 files inspected, 6 offenses detected, 6 offenses corrected
This commit is contained in:
committed by
Maikel Linke
parent
164385ad13
commit
2dbaa7f89d
@@ -34,18 +34,6 @@ Layout/LineLength:
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
- 'spec/system/consumer/shopping/products_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/v0/orders_controller_spec.rb'
|
||||
- 'spec/system/admin/order_cycles/complex_editing_spec.rb'
|
||||
- 'spec/system/admin/overview_spec.rb'
|
||||
- 'spec/system/admin/payment_method_spec.rb'
|
||||
- 'spec/system/admin/variant_overrides_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
|
||||
@@ -147,7 +147,7 @@ module Api
|
||||
|
||||
expect(json_response['orders']
|
||||
.map{ |o| o[:id] }).to eq serialized_orders([order2, order3, order1, order4])
|
||||
.map{ |o| o["id"] }
|
||||
.map{ |o| o["id"] }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ describe '
|
||||
# Then I should see the basic settings
|
||||
expect(page.find('#order_cycle_name').value).to eq(oc.name)
|
||||
expect(page.find('#order_cycle_orders_open_at').value)
|
||||
.to eq(oc.orders_open_at.strftime("%Y-%m-%d %H:%M"))
|
||||
.to eq(oc.orders_open_at.strftime("%Y-%m-%d %H:%M"))
|
||||
expect(page.find('#order_cycle_orders_close_at').value)
|
||||
.to eq(oc.orders_close_at.strftime("%Y-%m-%d %H:%M"))
|
||||
.to eq(oc.orders_close_at.strftime("%Y-%m-%d %H:%M"))
|
||||
expect(page).to have_content "COORDINATOR #{oc.coordinator.name}"
|
||||
|
||||
click_button 'Next'
|
||||
|
||||
@@ -13,7 +13,7 @@ describe '
|
||||
before do
|
||||
@enterprise_user = create(:user)
|
||||
allow_any_instance_of(Spree::Admin::OverviewController).to receive(:spree_current_user)
|
||||
.and_return @enterprise_user
|
||||
.and_return @enterprise_user
|
||||
login_as @enterprise_user
|
||||
end
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ describe '
|
||||
Stripe.api_key = "sk_test_12345"
|
||||
stub_request(:get,
|
||||
"https://api.stripe.com/v1/accounts/acc_connected123")
|
||||
.to_return(body: JSON.generate(stripe_account_mock))
|
||||
.to_return(body: JSON.generate(stripe_account_mock))
|
||||
stub_request(:get,
|
||||
"https://api.stripe.com/v1/accounts/acc_revoked123").to_return(status: 404)
|
||||
end
|
||||
|
||||
@@ -211,7 +211,7 @@ describe "
|
||||
|
||||
# Set a user without suficient permissions
|
||||
allow_any_instance_of(Spree::Admin::BaseController).to receive(:current_spree_user)
|
||||
.and_return(build(:user))
|
||||
.and_return(build(:user))
|
||||
|
||||
expect do
|
||||
click_button 'Save Changes'
|
||||
|
||||
Reference in New Issue
Block a user