Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added support for publishing custom methods

  • Loading branch information...
commit ed5f0a6cea9f7cb08fb377b7ea848e24932bfdfb 1 parent 7091910
jward authored December 29, 2012
1  services/api.ts
@@ -48,7 +48,6 @@ export class Api {
48 48
     if (!service[method.name])
49 49
       return;
50 50
 
51  
-    console.log(method);
52 51
     this._app[method.verb](endpoint, function(req, res){});
53 52
   }
54 53
 
5  test/services-api-tests.js
@@ -54,7 +54,7 @@ describe('services', function() {
54 54
     beforeEach(function() {
55 55
       api.publish('people', service, {
56 56
         extras: [
57  
-          {name: 'custom', id: true}
  57
+          {name: 'poke', id: true}
58 58
         ]
59 59
       });
60 60
     });
@@ -85,8 +85,7 @@ describe('services', function() {
85 85
 
86 86
     it('should publish custom methods correctly', function() {
87 87
       assert(app.post.called, 'app.post should be called');
88  
-      console.log(app.post.args);
89  
-      assert(app.post.calledWith('/api/v1/people/:id/custom'), 'app.post - custom - has wrong params');
  88
+      assert(app.post.calledWith('/api/v1/people/:id/poke'), 'app.post - custom - has wrong params');
90 89
     });
91 90
 
92 91
   });

0 notes on commit ed5f0a6

Please sign in to comment.
Something went wrong with that request. Please try again.