                 action: ->
                   2
 
-          route = Restivus.routes[1]
+          route = Restivus.routes[3]
           test.equal route.path, 'tests'
           test.equal route.endpoints.get.action(), 2
           test.isTrue route.options.authRequired

          test.equal response.message, 'API endpoint not found'
          next()

    describe 'An endpoint', ->

      it 'should cause an error when it returns null', (test, next) ->

          test.throws Restivus.configure, 'Restivus.configure() can only be called once'

        it 'should configure any previously added routes', (test) ->
          route = Restivus.routes[2]
          test.equal route.endpoints.get.action(), 1
          test.isTrue route.endpoints.get.authRequired
          test.equal route.endpoints.get.roleRequired, ['admin']

        it 'should configure any previously added collection routes', (test) ->
          route = Restivus.routes[3]
          test.equal route.endpoints.get.action(), 2
          test.isTrue route.endpoints.get.authRequired
          test.equal route.endpoints.get.roleRequired, ['admin']
