From 19962b5a9e7a4c0c7711701e2b4d0ea1c74bbcfd Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Thu, 6 Sep 2007 08:44:55 +0000
Subject: [PATCH] Add a case where there are more than one negative stock date
 to check the right one is returned.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16102 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testInventoryAPI.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/product/ERP5/tests/testInventoryAPI.py b/product/ERP5/tests/testInventoryAPI.py
index 3c5aa0681f..cedffb7d32 100644
--- a/product/ERP5/tests/testInventoryAPI.py
+++ b/product/ERP5/tests/testInventoryAPI.py
@@ -1368,6 +1368,10 @@ class TestNextNegativeInventoryDate(InventoryAPITestCase):
     self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+2)
     makeMovement(quantity=5, change_way=1, start_date=date+1)
     self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
+    makeMovement(quantity=7, change_way=0, start_date=date+5)
+    self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+5)
+    makeMovement(quantity=7, change_way=1, start_date=date+4)
+    self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
     makeMovement(quantity=7, change_way=0, start_date=date+3)
     self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+3)
 
-- 
2.30.9