   describe 'An endpoint', ->
 
     it 'should respond with the default headers when not overridden', (test) ->
-      Restivus.addRoute 'testDefaultHeaders',
+      Restivus.addRoute 'default-headers',
         get: ->
           true
 
-      result = HTTP.get 'http://localhost:3000/api/v1/testDefaultHeaders'
+      result = HTTP.get 'http://localhost:3000/api/v1/default-headers'
 
       test.equal result.statusCode, 200
       test.equal result.headers['content-type'], 'text/json'

        next()

    it 'should cause an error when it returns null', (test, next) ->
      Restivus.addRoute 'testNullResponse',
        get: ->
          null

      HTTP.get 'http://localhost:3000/api/v1/testNullResponse', (error, result) ->
        test.isTrue error
        test.equal result.statusCode, 500
        next()

    it 'should cause an error when it returns undefined', (test, next) ->
      Restivus.addRoute 'testUndefinedResponse',
        get: ->
          undefined

      HTTP.get 'http://localhost:3000/api/v1/testUndefinedResponse', (error, result) ->
        test.isTrue error
        test.equal result.statusCode, 500
        next()

    it 'should be able to handle it\'s response manually', (test, next) ->
      Restivus.addRoute 'testManualResponse',
        get: ->
          @response.write 'Testing manual response.'
          @response.end()
          @done()

      HTTP.get 'http://localhost:3000/api/v1/testManualResponse', (error, result) ->
        response = result.content

        test.equal result.statusCode, 200

        next()

    it 'should return a 405 error if that method is not implemented on the route', (test, next) ->
      Restivus.addCollection new Mongo.Collection('method-not-implemented'),
        excludedEndpoints: ['get', 'getAll']

      HTTP.get 'http://localhost:3000/api/v1/method-not-implemented/', (error, result) ->
        response = JSON.parse result.content
        test.isTrue error
        test.equal result.statusCode, 405
