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
cyrillefr
758d78bfe4
Fixes RSpecRailsInferredSpecType
2025-05-21 09:43:24 +02:00
David Cook
176e33d6bf
Rubocop fixes
2025-04-01 09:29:27 +11:00
Tresor11
507705a4eb
Update method name to require
...
This commit updates the method name to be called required_enterprise
since we only expect it to raise an error when the enterprise is not found.
2025-03-31 22:28:38 +03:00
Gaetan Craig-Riou
0569b30e0d
Refactor Vine related services
...
Move them under Vine module to keep the code nicely organised
2024-11-28 13:35:01 +01:00
Gaetan Craig-Riou
08308ba08e
Fix spec checking if VINE api is set up
...
The condition for checking the error now match a real scenario
2024-10-08 16:15:35 +11:00
Gaetan Craig-Riou
df67b53971
Re add VINE_API_URL env variable
...
And add error handling if the variable is not set
2024-10-08 13:26:57 +11:00
Gaetan Craig-Riou
b14a1e72f3
Handle api secret
...
The VINE Api require a secret and an API key to be used. The secret is
used to sign the request. The secret is linked to the API key so we need
to store it along side the key.
2024-10-07 15:09:58 +11:00
Gaetan Craig-Riou
224738e0a1
Per review, clean up code
2024-10-07 15:09:51 +11:00
Gaetan Craig-Riou
22428fc78d
ConnectedApps controller, handle ConnectedApps::Vine
...
Add logiv to connect and disconnect VINE API plus spec
2024-10-02 16:44:27 +10:00
Gaetan Craig-Riou
68fa903d61
Add missing permission check on buu action
...
Plus request spec
2024-09-18 10:24:09 +10:00
cyrillefr
0470efa502
Requested changes: turbo_stream for success
...
- must respond via turbo for create and update for success
- changed the spec accordingly
2024-06-13 15:22:54 +02:00
cyrillefr
c5decfc58b
Bugfix introduced by last commit
...
- fixed bug created by last commit
- refactored to new method respond_with_error
- need for 2 cases in request spec: html & turbo
2024-06-12 00:31:19 +02:00
cyrillefr
942990612b
Requested changes
...
- refined the code and applied it to create method too
- modified one request spec to work with turbo_stream
- added 2 examples in system specs
2024-06-11 22:29:12 +02:00
cyrillefr
01612843b4
BUU Display error messages when file not valid
...
- implements a turbo response in controller
- display error messages on modal -> able for user to re upload
- removes a pending in spec that now tests error message
2024-06-10 14:32:08 +02:00
Maikel Linke
6317fe1b71
Disable RSpec monkey patching
2024-05-09 12:24:41 +10:00
Maikel Linke
bd6b0ddbf3
Enforce RSpec expect(..).not_to over to_not
2024-03-07 16:57:54 +11:00
David Cook
2107aeded1
Un-safely autocorrect RSpec/ExpectChange
2024-02-23 12:17:09 +11:00
David Cook
a915182bf8
Add tests for image controller
2024-01-25 14:14:58 +11:00
Maikel Linke
a8c83b670b
Remove superfluous feature tag from specs
2024-01-08 15:53:50 +11:00
Maikel Linke
d841b1dae2
DRY feature activation in specs
...
It's simple this way and we have one place to add logic to when needed
(see next commit).
2023-11-17 13:17:27 +11:00
Gaetan Craig-Riou
f225cd78df
Handle unique voucher code exception
...
Rails validation doesn't handle unique validation for soft deleted
object. So we rescue the exception raise by the database and display
a nice error message. We don't want an enterprise to be able to reuse
a code in case the voucher get reactivated.
2023-09-07 15:13:47 +02:00
Maikel Linke
ba53f31309
Use new hash syntax in Voucher spec
2023-08-14 12:40:54 +10:00
Maikel Linke
160cdc7f8e
Clarify Voucher request spec not a controller spec
2023-08-14 12:25:56 +10:00
Maikel Linke
efe2dfff8e
Let Rails handle Voucher type building
2023-08-14 11:51:34 +10:00
Maikel Linke
4d5e1ffb3b
Simplify VouchersController with single param name
...
The Voucher form now deals with a generic Voucher instead of a subclass
which makes the naming easier and is less confusing when changing types.
2023-08-14 11:39:59 +10:00
Gaetan Craig-Riou
06f986ff52
Allow for creating a voucher with either flat or percentage rate
...
In the scenario when you get an error when trying to create a
percentage voucher, on the subsequent try we would be dealing with
a "percentage rate voucher". The code now handle any type of voucher
2023-08-11 16:09:48 +10:00
Gaetan Craig-Riou
29a38467d2
Fix admin pages to work with refactored vouchers
2023-08-11 14:54:23 +10:00
Gaetan Craig-Riou
cc9069e9c6
Add voucher type to admin screen
...
Plus specs
2023-08-11 14:19:26 +10:00
Konrad
fed7c3da51
Merge pull request #10761 from rioug/vouchers-any-amount
...
[Vouchers] Flat rate of any amount
2023-05-19 17:39:33 +02:00
Maikel Linke
eaf3bd0bae
Update spec after new import file validation
2023-05-17 15:18:29 +10:00
Maikel Linke
a0d05b26d1
Spec current product import vulnerabilities
...
I didn't use pending specs but deliberately passing specs on wrong
behaviour. This is not how it should be but how it is at the moment.
2023-05-17 15:09:01 +10:00
Gaetan Craig-Riou
b427e420ce
Update admin pages to allow entering an amount
2023-05-16 16:20:04 +10:00
Rohan Mitchell
488fc2d60e
Upgrade capybara, spec/requests changed to spec/features
2013-01-15 10:10:24 +11:00
Rohan Mitchell
e46d61075e
Simplify field naming
2013-01-10 15:33:56 +11:00
Rohan Mitchell
4e78fa19a3
Add spec for updating order cycle, minor fixes
2013-01-10 15:29:13 +11:00
Rohan Mitchell
31ea8540ea
Test editing an order cycle - all data is displayed
2013-01-10 15:02:56 +11:00
Rohan Mitchell
ba19db3ccf
Add or update exchange variants when creating or updating order cycles
2013-01-09 10:06:51 +11:00
Rohan Mitchell
043e67fd9d
Test adding suppliers
2013-01-08 11:58:49 +11:00
Rohan Mitchell
a0c40607ec
Bulk update order cycle opening/closing times
2012-12-02 15:43:05 +11:00
Rohan Mitchell
aacc36ea44
Create order cycle basic fields
2012-11-29 10:02:23 +11:00
Rohan Mitchell
d5310452b6
Admin list order cycles
2012-11-27 10:13:12 +11:00
Rohan Mitchell
6106f1b469
Calculator type change works, enterprise fee tests pass
2012-11-26 09:45:06 +11:00
Rohan Mitchell
fa2addd025
Delete enterprise fee
2012-11-21 12:17:19 +11:00
Rohan Mitchell
77b78f5bbb
Edit enterprise fee
2012-11-21 11:50:37 +11:00
Rohan Mitchell
a4d10ab4e0
Create new enterprise fee, display errors when present
2012-11-21 09:47:51 +11:00
Rohan Mitchell
ff0d2bc983
Create EnterpriseSet as subclass of ModelSet
2012-11-21 09:08:41 +11:00
Rohan Mitchell
98143ffe5b
Add calculator to EnterpriseFee, test passes for listing enterprise fees
2012-11-16 16:07:40 +11:00
Rohan Mitchell
03764881c8
Generalise EnterpriseSet to ModelSet
2012-11-15 14:29:38 +11:00
Rohan Mitchell
6d84cf7613
Merge branch 'master' into enterprises
...
Conflicts:
app/controllers/enterprises_controller.rb
app/views/spree/checkout/_distributor.html.haml
db/schema.rb
spec/lib/open_food_web/group_buy_report_spec.rb
2012-11-01 11:02:02 +11:00