Commit Graph

100 Commits

Author SHA1 Message Date
Maikel
d8d20429aa Revert "Instagram pattern" 2018-11-09 13:33:11 +11:00
fabricio.albarnaz
8e4adbd23a Add more test cases 2018-10-16 15:34:46 -03:00
fabricio.albarnaz
02bc134c59 Change befor save check to format validation 2018-10-15 17:51:33 -03:00
fabricio.albarnaz
48720c835c Add spec to instagram pattern 2018-10-11 16:30:17 -03:00
Maikel Linke
306bfa1944 Remove unused method enterprise method
`Enterprise.has_supplied_products_on_hand?` is not used anywhere.
2018-06-27 11:25:44 +10:00
Maikel Linke
792701297b Remove unused scope Enterprise.active_distributors
Working on the Spree upgrade, we found that this scope is using the soon
obsolete column `spree_products.count_on_hand`. Trying to measure the
impact of changing this scope, I couldn't find any use of it.

There is a variable called `active_distributors` used when serialising
enterprises, but that variable is initialised with
`Enterprise.distributors_with_active_order_cycles.ready_for_checkout`,
not using the `active_distributors` scope.

See also:
https://github.com/openfoodfoundation/openfoodnetwork/issues/2013
2018-06-27 11:12:54 +10:00
Pau Perez
5a182e8e88 Remove enterprises producers tab from dashboard 2018-05-22 10:21:35 +02:00
Rory Trunkhill
5706cecf26 modify enterprise eror name message #620 2018-05-17 18:10:35 +00:00
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
Rob Harrington
236ba9328d Order cycles in specs comply with new date validations 2018-04-04 17:18:33 +10:00
Pierre de Lacroix
5c046b76f0 Fix failing tests 2018-02-13 14:05:17 +00:00
Matt-Yorkley
9248ac05ac Adjustments for failing specs 2018-02-07 10:41:53 +11:00
Matt-Yorkley
ba98c7e2c5 Rewrite enterprise contact functionality 2018-02-07 10:41:52 +11:00
Matt-Yorkley
22eae753fe Remove enterprise confirmations 2018-02-07 10:41:52 +11:00
Enrico Stano
660d3f326f Remove unused Enterprise scopes 2017-12-20 16:00:35 +11:00
Rohan Mitchell
dabac50128 Replace Enterprise.distributing_product and Enterprise.distributing_any_product_of with Enterprise.distributing_products 2016-11-25 14:14:42 +11:00
Maikel Linke
a7e3b2d9df Update enterprise email tests 2016-02-24 16:21:18 +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
Maikel Linke
c4fb4a8510 Removing Suburbs from the code
Suburbs are not used any more. Removing the last code bits should avoid
confusion and save a tiny bit of test time.
2015-12-04 10:37:55 +11:00
Rohan Mitchell
3f8235593a When enterprise is deleted, delete relationships 2015-07-10 09:42:09 +10:00
Rohan Mitchell
c5526c78d9 Make enterprise name unique 2015-06-17 15:01:46 +10:00
Rob Harrington
359328a96e Producers and distributors lists include self where appropriate 2015-06-03 16:18:44 +08:00
Continuous Integration
c14de4e97f Auto-merge from CI [skip ci] 2015-05-29 14:29:23 +10:00
Rohan Mitchell
7486daa2a3 Merge branch 'master' into require_standard_variant
Conflicts:
	spec/controllers/spree/admin/variants_controller_spec.rb
	spec/lib/open_food_network/permissions_spec.rb
	spec/lib/open_food_network/products_and_inventory_report_spec.rb
	spec/models/enterprise_spec.rb
2015-05-28 15:08:13 +10:00
Maikel Linke
e4f93863fd Finding unique permalink before validation. 2015-05-28 11:27:40 +10:00
Rohan Mitchell
97e49c2bdb Replace 'array.sort.should == expected.sort' pattern with match_array 2015-05-28 10:46:08 +10:00
Rob Harrington
e931f4b31f Merge branch 'master' into require_standard_variant 2015-05-22 12:22:54 +10:00
Rohan Mitchell
1531c476e3 Merge branch 'master' into require_standard_variant
Conflicts:
	spec/controllers/spree/admin/variants_controller_spec.rb
2015-05-08 13:45:31 +10:00
Rob Harrington
7ffe0f042e Moving accessible_by scope on Enterprise to permissions 2015-05-07 12:50:55 +10:00
Rob Harrington
d8c23d37ac Update accessible_by scope on enterprise, to read from permissions 2015-05-07 12:50:54 +10:00
Rohan Mitchell
700cb73b8f Send enterprise confirmation emails asynchronously 2015-04-21 16:19:02 +10:00
Rob Harrington
b9f19d5777 Fixing broken specs 2015-04-17 13:00:20 +10:00
Rohan Mitchell
e9fbd74e88 Send emails via jobs instead of synchronously 2015-04-16 16:54:43 +10:00
Rohan Mitchell
e570352a1b Grant fewer permissions on enterprise creation 2015-04-16 10:59:15 +10:00
Rohan Mitchell
fa4741eb65 Update auto-creation of E2E links: more specific and restricted link creation 2015-02-26 13:49:15 +11:00
Rohan Mitchell
636ed2ad0d Make bi-directional relationships 2015-02-13 09:24:48 +11:00
Rohan Mitchell
1d61e91afd When enterprise created, grant permission to all co-owned enterprises, not just hubs 2015-02-13 09:24:48 +11:00
Rohan Mitchell
7ac888ae00 Admin can grant create_variant_overrides permission 2015-01-30 11:56:05 +11:00
Rob Harrington
36430d3bad Enterprise permalink generator handles blank permalink case 2015-01-22 10:19:46 +11:00
Rob Harrington
7520552fd7 Removing spec for testing empty permalink, since we now force permalink to be created when empty 2015-01-22 10:19:46 +11:00
Rob Harrington
3e5ea3fe63 Adding automatic permalink generation on enterprise creation 2015-01-22 10:19:45 +11:00
Rob Harrington
6b10a4a775 Restoring enterprise permalinks when they cause errors 2015-01-22 10:19:43 +11:00
Rob Harrington
9f0aeb5adf Adding unique permalink to enterprises 2015-01-22 10:19:41 +11:00
summerscope
d2d3a577ea Merging master into this branch to make it easy to pull for staging push 2015-01-15 17:38:35 +11:00
Rob Harrington
fcb14f32d2 Validating user input for shopfront taxon order 2014-12-19 14:04:02 +11:00
Rob Harrington
ee2ee5dba7 Adding an enterprise welcome email 2014-11-12 15:20:51 +11:00
Rob Harrington
e1823212d6 Reconfirmation email not required when we already know about new email address for enterprise 2014-11-06 21:19:22 +11:00
Rohan Mitchell
abeabd5b1c Add Enterprise#ready_for_checkout? 2014-10-31 14:04:43 +11:00
Rohan Mitchell
94d50f220f Display an error message to admin when there are hubs in order cycles that are not ready for checkout 2014-10-31 12:22:02 +11:00
Rohan Mitchell
f0d3b987d4 Show hubs as unavailable when they do not have available payment and shipping methods 2014-10-31 12:22:02 +11:00