26 Commits

Author SHA1 Message Date
Maikel Linke
dcb6f4676d Remove all unnecessary spec_helper require statements
The `.rspec` file is doing this for us.
2026-01-21 12:35:34 +11:00
David Rodríguez
4c6d894bc0 Bump RuboCop to 1.86.6
There were a few changes needed:

* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
  are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
  rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
  with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
  --exclude-limit 1400 --no-auto-gen-timestamp`.
2025-10-27 11:30:33 +01:00
Maikel Linke
77b7b5ea47 Style Metrics/ModuleLength in spec file
Best viewed without whitespace changes.
2025-06-16 16:45:00 +10:00
cyrillefr
90d8d9fc30 Fixes RSpecRailsInferredSpecType offense in api v0 2025-05-20 12:45:34 +02:00
cyrillefr
f810e500b5 Fixes RSpec Rails HaveHttpStatus cop in api v0 2025-05-14 10:46:36 +02:00
Ahmed Ejaz
20146a8e11 update respective specs 2025-04-13 21:35:55 +05:00
Gaetan Craig-Riou
71b6938961 Fix API V0 order controller spec 2024-07-03 10:17:49 +10:00
Ahmed Ejaz
72640cfc2a 12346: refactor orders_controller spec 2024-06-24 14:43:17 +05:00
Ahmed Ejaz
afd09091a2 12346 - fix broken specs 2024-06-22 02:11:39 +05:00
Ahmed Ejaz
98e0b0e703 12346 - fix rubocop rails/pluck errors 2024-06-22 01:45:58 +05:00
Maikel Linke
6317fe1b71 Disable RSpec monkey patching 2024-05-09 12:24:41 +10:00
Neal Chambers
42a6a02353 Fix Style/HashSyntax 2023-09-19 08:25:56 +09:00
Mohamed ABDELLANI
04312b05c6 add orders without billing address to SearchOrders#fetch_orders' results 2023-08-25 15:48:31 +10:00
Matt-Yorkley
4934d09a4c Update delegation and method chaining between product and tax_category 2023-07-31 09:23:20 +10:00
Neal Chambers
2dbaa7f89d 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
2023-07-27 09:58:33 +10:00
Neal Chambers
5b6f45931c Fix Layout/LineLength 2023-06-26 13:06:56 +09:00
Neal Chambers
940f806e5f Fix Rubocop Layout/LineLength 2023-04-04 09:44:15 +09:00
cyrillefr
f9f6abf740 Remove I18n keys from Api Ctrllers spec 2023-02-15 11:08:19 +01:00
Matt-Yorkley
35e20fc179 Can sort orders via bill_address.lastname
We only need to check the orders sort

Fix ordering in api/v0/orders_controller_spec
2021-12-16 09:33:38 +01:00
Luis Azcuaga
e8fd89a6d2 Run rubocop over existing todo 2021-10-25 21:28:28 -05:00
Jean-Baptiste Bellet
115dac3ca9 Add tax_category_id for a line_item 2021-10-18 10:56:27 +02:00
Adrien Chauve
f256bb7d28 Add new failing test on sorting orders by total (api/v0/orders) 2021-10-01 18:32:59 +02:00
Luis Ramos
23627c5453 Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
9290 issues fixed
2021-06-17 22:19:26 +01:00
Pau Perez
679de40a41 Move specs to where they belong 2021-04-26 10:15:13 +02:00
Matt-Yorkley
fa14a80295 Adapt order payment creation in failing specs
In the test setups here order.payments is empty
2021-04-14 09:22:31 -07:00
Andy Brett
5a19a14042 rename to v0 2021-03-27 11:21:18 -07:00