Commit Graph

58 Commits

Author SHA1 Message Date
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
Rohan Mitchell
d89945bbb2 Add smoke test for reports, fix use of old Distributor model 2012-11-01 10:20:06 +11:00
Rohan Mitchell
34588e6141 Remove old supplier and distributor routes, models, controllers, views, specs 2012-11-01 09:55:45 +11:00
Rohan Mitchell
d927906934 Update admin views, tests pass 2012-11-01 08:36:40 +11:00
Rohan Mitchell
f8c2c8bbed Convert group buy unit size field from string to float 2012-11-01 08:02:11 +11:00
Rohan Mitchell
1d1c27701d Add admin interface for enterprises 2012-10-31 14:25:00 +11:00
Rohan Mitchell
c46019d68c WIP: Move Supplier, Distributor, DistributorSet and ProductDistribution models out of Spree namespace 2012-10-25 10:45:39 +11:00
Rohan Mitchell
5b025a6cba Make group_buy_unit_size accessible 2012-10-18 15:15:54 +11:00
Rohan Mitchell
9166829930 Add group buy unit size field 2012-10-18 11:56:21 +11:00
Rohan Mitchell
015b7f88b0 Add tests for CMS admin security 2012-10-11 13:17:05 +11:00
Rohan Mitchell
28fc16ac66 Create links between Spree and CMS admin sections 2012-10-11 12:50:59 +11:00
Rohan Mitchell
c07a33d88c Edit long description field in admin for suppliers and distributors 2012-10-11 10:50:36 +11:00
Rohan Mitchell
6d9257d941 Do not delete shipping method referenced by a line item 2012-10-02 12:15:09 +10:00
Rohan Mitchell
7430fc9bdd Do not delete shipping method referenced by a product distribution 2012-10-02 11:58:18 +10:00
Rohan Mitchell
473b4e9adc Add positive case test 2012-10-02 11:54:18 +10:00
Rohan Mitchell
2aa450b072 Do not delete shipping method referenced by an order 2012-10-02 11:51:13 +10:00