[Groonga-commit] droonga/express-droonga at 5bcb44b [master] Add "from" field to the generated expected envelope

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Oct 16 16:11:08 JST 2013


YUKI Hiroshi	2013-10-16 16:11:08 +0900 (Wed, 16 Oct 2013)

  New Revision: 5bcb44b08e7b29bb600faf3b7a9392bb5f6c152f
  https://github.com/droonga/express-droonga/commit/5bcb44b08e7b29bb600faf3b7a9392bb5f6c152f

  Message:
    Add "from" field to the generated expected envelope

  Modified files:
    test/test-utils.js

  Modified: test/test-utils.js (+3 -2)
===================================================================
--- test/test-utils.js    2013-10-16 16:10:35 +0900 (0642115)
+++ test/test-utils.js    2013-10-16 16:11:08 +0900 (61db62d)
@@ -303,7 +303,7 @@ function createEnvelope(type, body, options) {
   var envelope = {
     id:         now.getTime(),
     date:       now.toISOString(),
-    replyTo:    'localhost:' + testReceivePort + '/' + testTag,
+    from:       'localhost:' + testReceivePort + '/' + testTag,
     statusCode: 200,
     dataset:    options.dataset || 'test-dataset',
     type:       type,
@@ -316,11 +316,12 @@ exports.createEnvelope = createEnvelope;
 function createExpectedEnvelope(type, body, options) {
   var envelope = createEnvelope(type, body);
   envelope.id = TypeOf('string');
+  envelope.from = new RegExp('^' + envelope.from + '\\?connection_id=\\d+$');
   envelope.date = InstanceOf(Date);
   if (options && options.dataset)
     envelope.dataset = options.dataset;
   if (options && options.requireReply)
-    envelope.replyTo = new RegExp('^' + envelope.replyTo + '\\?connection_id=\\d+$');
+    envelope.replyTo = envelope.from;
   return envelope;
 }
 exports.createExpectedEnvelope = createExpectedEnvelope;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index