     # test both nodes
     for idx in [0,1]
       expect(@typeOf(scope.nodes[idx])).toBe('object')
-      expect(scope.nodes[idx]['id']).toBe(@nodes[idx]['id'])
+      expect(scope.nodes[idx]['id']).toBe(nodes[idx]['id'])
 
   it 'should be able to access /node/xyz info (empty node)', () ->
     id = 'test'

    expect(scope.ponyExpressHost).toBe('127.0.0.1')

  it 'should be able to list /nodes', () ->
    @httpBackend.expectGET('/v1/nodes')
    scope.fetch()
    @httpBackend.flush()

    @typeOf = (obj) ->
      ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()

    MainCtrl = $controller('MainCtrl', {
      $scope: scope,
      Restangular: @Restangular
