fix: require store for new orders, if so configured
This commit is contained in:
parent
f3cca2e370
commit
7ea83b2715
2 changed files with 13 additions and 1 deletions
|
@ -1114,9 +1114,15 @@ class TestNewOrderBatchHandler(DataTestCase):
|
|||
self.session.add(row)
|
||||
self.session.flush()
|
||||
|
||||
# batch is okay to execute..
|
||||
reason = handler.why_not_execute(batch)
|
||||
self.assertIsNone(reason)
|
||||
|
||||
# unless we also require store
|
||||
self.config.setdefault('sideshow.orders.expose_store_id', 'true')
|
||||
reason = handler.why_not_execute(batch)
|
||||
self.assertEqual(reason, "Must assign the store")
|
||||
|
||||
def test_make_local_customer(self):
|
||||
model = self.app.model
|
||||
enum = self.app.enum
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue