Commit 443a3006 authored by Lucas Carvalho's avatar Lucas Carvalho

- Added new test to check if the comment added during the checkout will be set...

- Added new test to check if the comment added during the checkout will be set on the sale order object generated.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29131 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 430c0be6
......@@ -918,6 +918,24 @@ class TestCommerce(ERP5TypeTestCase):
self.assertEquals(product.Resource_getShopUrl(),
'%s/%s' % (product.getRelativeUrl(), 'Resource_viewAsShop'))
def test_28_finalizeShoppingWithComment(self):
"""
Testing if the comment added during the checkout will be set on the sale
order object generated.
"""
self.changeUser('webmaster')
comment = 'TESTING COMMENT'
self.portal.Resource_addToShoppingCart(self.getDefaultProduct(),
quantity=1)
self.web_site.SaleOrder_paymentRedirect(field_my_comment=comment)
self.web_site.SaleOrder_finalizeShopping()
transaction.commit()
self.tic()
sale_order_object_list = self.portal.sale_order_module.contentValues()
self.assertEquals(comment, sale_order_object_list[0].getComment())
import unittest
def test_suite():
suite = unittest.TestSuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment