details:   https://code.openbravo.com/erp/devel/pi/rev/44096d49148a
changeset: 22897:44096d49148a
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Tue Apr 22 13:52:02 2014 +0200
summary:   related to issue 26317: fixed test case

ensure proper profile

diffstat:

 src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java |  8 
+++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 001203d51bb0 -r 44096d49148a 
src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java
--- a/src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java 
Tue Apr 22 16:58:41 2014 +0530
+++ b/src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java 
Tue Apr 22 13:52:02 2014 +0200
@@ -31,6 +31,7 @@
  * 
  */
 public class ProductSelectorDataSourceTest extends BaseDataSourceTestNoDal {
+  private boolean defaultRoleSet = false;
 
   /**
    * Obtains a list of all warehouses from the selector. Test for issue #26317
@@ -50,6 +51,12 @@
   }
 
   private JSONObject performRequest(boolean addFilter) throws Exception {
+    if (!defaultRoleSet) {
+      changeProfile("42D0EEB1C66F497A90DD526DC597E6F0", "192", 
"E443A31992CB4635AFCAEABE7183CE85",
+          "B2D40D8A5D644DD89E329DC297309055");
+      defaultRoleSet = true;
+    }
+
     Map<String, String> params = new HashMap<String, String>();
     params.put("_selectorDefinitionId", "4C8BC3E8E56441F4B8C98C684A0C9212");
     params.put("filterClass", 
"org.openbravo.userinterface.selector.SelectorDataSourceFilter");
@@ -74,7 +81,6 @@
 
     String response = 
doRequest("/org.openbravo.service.datasource/ProductStockView", params, 200,
         "POST");
-    System.out.println(response);
     JSONObject resp = new JSONObject(response).getJSONObject("response");
 
     assertTrue("Response should have data", resp.has("data"));

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to