Commit Graph

47 Commits

Author SHA1 Message Date
Daniel Dominguez
9d9a974295 Switched gem FactoryGirl to FactoryBot as FactoryGirl is deprecated.
- Change FactoryGirl to FactoryBot everywhere on code.
2018-05-04 11:52:08 -03:00
Pau Perez
72889b5c36 Stub current_user instead of api key's user 2017-12-21 10:24:29 +11:00
Pau Perez
bb0223877c Remove unused arguments and reduce object creation 2017-12-20 17:25:23 +11:00
Pau Perez
5eb1fcddbb Remove dependency on TestingSupport by inlining 2017-12-20 17:25:23 +11:00
Pau Perez
c646eb3939 Disable api auth as there is no Spree api key set
Although Spree::Api::Config[:requires_authentication] is set to false by
default for some unknown reason if not done explicitly Spree still
returns it as false.

This amends the change done in a87c89c83d,
which introduced the bug. As there is no Spree api key set the auth
fails when getting taxons.
2017-12-20 17:25:23 +11:00
Rob Harrington
82072c8970 Explicitly specifying 'type: :controller' for all controller specs 2017-11-10 08:47:12 +11:00
enricostano
513330cfff Add JSON api for products clone 2017-09-08 23:55:49 +10:00
Rohan Mitchell
fdd6400cb8 Fix perms for API soft delete 2016-11-04 09:39:17 +11:00
Maikel Linke
cd7721a127 Using date and time of current timezone
Using Time.zone.now and Date.current instead of Time.now and Date.today.
This should make all specs timezone independent.
2015-12-10 11:38:41 +11:00
Rob Harrington
ab7bfd10c5 Revert "Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module"
This reverts commit e86e08b72e939fee61eddd41d56081395666a877.

Conflicts:
	lib/open_food_network/order_and_distributor_report.rb
	spec/features/admin/variants_spec.rb
	spec/lib/open_food_network/order_and_distributor_report_spec.rb
2015-10-28 13:08:50 +11:00
Rob Harrington
795830d94d Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module 2015-10-28 13:07:31 +11:00
Lynne Davis
8639109372 Variable weights improvements additions 2015-08-04 20:13:28 +01:00
Rob Harrington
903ed7e507 Merge branch 'master' into variable_weights
Conflicts:
	app/assets/javascripts/admin/bulk_order_management.js.coffee
	app/views/spree/admin/orders/bulk_management.html.haml
	app/views/spree/api/line_items/bulk_show.v1.rabl
	spec/features/admin/bulk_order_management_spec.rb
2015-05-21 17:31:33 +10:00
Rob Harrington
0b28771364 Removing unrequired specs for variant/product 'units_show' 2015-05-20 21:06:20 +10:00
Rob Harrington
0ad2978926 Removing old managed route from api orders controller and switching BOM over to use new controller action 2015-05-20 11:48:48 +10:00
Rob Harrington
a253b88525 Fixing line item controller spec 2015-04-29 10:42:38 +10:00
Lynne Davis
d344c3dec8 Updating the spec based on @Robs suggestions, hoping for his insights. Still doesn't work. 2015-04-24 16:22:17 +01:00
Lynne Davis
ffd850c761 Adding specs for variable weight adjustment via builk order management 2015-04-04 19:20:41 +01:00
Rohan Mitchell
9dc02e5eac Add product soft-delete API action 2014-06-12 14:59:26 +10:00
Rob H
43c5c37326 Add fields for variant display name and display as to bpe 2014-06-06 10:10:41 +10:00
Rohan Mitchell
3c8757034a Enterprise user can soft-delete a variant. BUT, only its own variants. 2014-04-24 13:20:16 +10:00
Rohan Mitchell
7931a2e8da Test managed products API access for all user types 2014-04-24 13:20:16 +10:00
Rohan Mitchell
6c86254a90 Extract sign_in_as_user method, test managed orders API access for normal user and enterprise user 2014-04-24 13:20:16 +10:00
Rohan Mitchell
95a6e34523 Spec access denied to regular user when soft-deleting variants 2014-04-24 13:20:16 +10:00
Rohan Mitchell
e6d988ff34 Nest variant soft delete route under product resource 2014-04-24 13:20:16 +10:00
Rohan Mitchell
e28a450875 Add API call to soft-delete a variant 2014-04-24 13:20:16 +10:00
Rob H
2eb21a024c Tiny fixes to API orders controller spec 2014-04-16 18:24:17 +10:00
Rob H
c68aeb4c36 Only show orders I am distributing in the API 2014-04-16 14:54:50 +10:00
Rob H
ff531f0e18 Producers can only list line items which contain products they supply 2014-04-11 09:39:01 +10:00
Rob H
e64bfe8ba3 Fix failing API Orders spec 2014-04-10 16:26:24 +10:00
Rob H
cd1086ce05 WIP: Bulk calculation box work with shared resources 2014-03-26 16:44:26 +11:00
Rob H
f2729f9e80 Add more columns to BOM 2014-03-21 13:46:48 +11:00
Rob H
ed0b7da20f BOM page has a fancy calculation box for managing group buys 2014-03-20 14:40:24 +11:00
Rob H
b6bd07abd3 BOM: show name from billing address 2014-03-07 12:56:39 +11:00
Rob H
0726d591ac BOM: can filter by order cycle 2014-03-06 10:50:27 +11:00
Rob H
1744cc9548 Orders API retrieves order number 2014-01-19 18:41:16 +08:00
Rob H
e2d9e9c4eb BOM API collects distributor for orders 2014-01-18 11:50:36 +08:00
Rob H
3f5930032b Add more detailed tests for output of orders API 2014-01-18 11:35:47 +08:00
Rob H
15c0350c29 Add product name as proxy for variant_unit_text to Order Managment API 2014-01-17 12:09:31 +08:00
Rob H
cfbf4d5bc4 Adding attributes to Order Managment API 2014-01-17 10:35:40 +08:00
Rob H
11499178cb Set up API for Bulk Order Management (BOM) 2014-01-16 11:56:11 +08:00
alexs
295d86affb Removed the test that is believed to be incorrect and failing build. 2013-08-09 14:44:54 +10:00
Andrew Spinks
7bd0582b50 remove pry call 2013-08-08 10:48:05 +10:00
David Cook
c247c2d3ea WIP: Allow distributor enterprise user to access their orders 2013-08-07 09:19:28 +10:00
Andrew Spinks
6c18c5c65f Fix bulk product edit so that it works with products with a blank available_on field. 2013-07-25 13:51:37 +10:00
Rob H
9863a84a27 WIP: transfer bulk product update data requests to API 2013-07-23 10:43:08 +10:00
Rob H
97c03b50cc Create new api routes/views/controllers for bulk product edit 2013-07-23 10:43:08 +10:00