From 560b82c459d12b8aed88efc5bbee4ff0f6ebfe61 Mon Sep 17 00:00:00 2001
From: murgatroid99 <mlumish@google.com>
Date: Fri, 17 Jul 2015 13:06:15 -0700
Subject: [PATCH] Added tests for UNKNOWN status when the handler does not
 specify

---
 src/node/test/surface_test.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index ce388ab3d8..125957277f 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -422,6 +422,7 @@ describe('Other conditions', function() {
     it('for a unary call', function(done) {
       client.unary({error: true}, function(err, data) {
         assert(err);
+        assert.strictEqual(err.code, grpc.status.UNKNOWN);
         assert.strictEqual(err.message, 'Requested error');
         done();
       });
@@ -429,6 +430,7 @@ describe('Other conditions', function() {
     it('for a client stream call', function(done) {
       var call = client.clientStream(function(err, data) {
         assert(err);
+        assert.strictEqual(err.code, grpc.status.UNKNOWN);
         assert.strictEqual(err.message, 'Requested error');
         done();
       });
@@ -440,6 +442,7 @@ describe('Other conditions', function() {
       var call = client.serverStream({error: true});
       call.on('data', function(){});
       call.on('error', function(error) {
+        assert.strictEqual(error.code, grpc.status.UNKNOWN);
         assert.strictEqual(error.message, 'Requested error');
         done();
       });
@@ -451,6 +454,7 @@ describe('Other conditions', function() {
       call.end();
       call.on('data', function(){});
       call.on('error', function(error) {
+        assert.strictEqual(error.code, grpc.status.UNKNOWN);
         assert.strictEqual(error.message, 'Requested error');
         done();
       });
-- 
GitLab