esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r904360 - /incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala
Date Fri, 29 Jan 2010 02:33:19 GMT
Author: esjewett
Date: Fri Jan 29 02:33:18 2010
New Revision: 904360

URL: http://svn.apache.org/viewvc?rev=904360&view=rev
Log:
Fix ApiTest failing tests

Modified:
    incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala

Modified: incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala?rev=904360&r1=904359&r2=904360&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala (original)
+++ incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala Fri Jan 29
02:33:18 2010
@@ -217,21 +217,22 @@
         //println(add_pool.xml)
       }
     }
-     "AddPoolNeg" in {
+
+    "AddPoolNeg" in {
       for{
         add_pool <- post("/api/add_pool/ttt8787") !@ "add pool should have failed with
no login" if shouldnt(testSuccess(add_pool))
         login <- post("/api/login", "token" -> token) !@ "Failed to log in" if (testSuccess(login))
-        add_pool1 <- login.post("/api/add_pool") !@ "add pool should have failed with
no pool name" if shouldnt(testSuccess(add_pool1))
-       } {
-        println(add_pool.xml)
+        add_pool1 <- login.post("/api/add_pool")
+      } {
+        add_pool1.code must be equalTo 404
       }
     }
   
     "SendMessageTokenNeg1" in {
       for{
-        send_msg <- post("/api/send_msg", "token" -> "badtoken", "message" -> "mymessage")
!@ "send_msg should have failed with bad token" if shouldnt(testSuccess(send_msg))
-       } {
-        println(send_msg.xml)
+        send_msg <- post("/api/send_msg", "token" -> "badtoken", "message" -> "mymessage")
// !@ "send_msg should have failed with bad token" if shouldnt(testSuccess(send_msg))
+      } {               
+        send_msg.code must be equalTo 404
       }
     }
     "SendMessageTokenNeg" in {



Mime
View raw message