{"action":"created","comment":{"url":"https://api.github.com/repos/manucarrace/gn/pulls/comments/168456307","pull_request_review_id":96823280,"id":168456307,"diff_hunk":"@@ -0,0 +1,101 @@\n+'use strict';\n+var entitiesSrv = require('../../lib/services/entities/entitiesController'),\n+    service = require('../../lib/service'),\n+    testConfig = require('../config-test.js'),\n+    httpMocks = require('node-mocks-http'),\n+    nock = require('nock'),\n+    should = require('should'),\n+    events = require('events'),\n+    constants = require('../../lib/constants');\n+\n+describe('Entities tests', function() {\n+    describe('Get entities data from FiWare contextBroker', function() {\n+        beforeEach(function() {\n+            service.start(testConfig, function(error) {\n+            });\n+        });\n+\n+        it('should get entities data', function(done) {\n+\n+            var req = {\n+                headers: {}\n+            };\n+            req.headers[constants.HEADERS.X_AUTH_TOKEN] = '098f6bcd4621d373cade4e832627b4f6';\n+            req.headers[constants.HEADERS.OFFSET] = 1;\n+            req.headers[constants.HEADERS.LIMIT] = 0;\n+\n+            var entitiesDataResponse = [\n+              {\n+                  'id': 'T0124',\n+                  'type': 'TestType',\n+                  'Humedad': {\n+                      'type': 'float',\n+                      'value': '55.0',\n+                      'metadata': {\n+                          'TimeInstant': {\n+                              'type': 'ISO8601',\n+                              'value': '2018-02-05T00:00:00.000Z'\n+                          }\n+                      }\n+                  },\n+                  'IMEI': {\n+                      'type': 'string',\n+                      'value': '00001110000',\n+                      'metadata': {\n+                          'TimeInstant': {\n+                              'type': 'ISO8601',\n+                              'value': '2018-02-05T00:00:00.000Z'\n+                          }\n+                      }\n+                  },\n+                  'Temperatura': {\n+                      'type': 'float',\n+                      'value': '23.3',\n+                      'metadata': {\n+                          'TimeInstant': {\n+                              'type': 'ISO8601',\n+                              'value': '2018-02-05T00:00:00.000Z'\n+                          }\n+                      }\n+                  },\n+                  'TimeInstant': {\n+                      'type': 'ISO8601',\n+                      'value': '2018-02-05T00:00:00.000Z',\n+                      'metadata': {}\n+                  },\n+                  'position': {\n+                      'type': 'geo:point',\n+                      'value': '00.000000, -0.000000',\n+                      'metadata': {\n+                          'TimeInstant': {\n+                              'type': 'ISO8601',\n+                              'value': '2018-02-05T00:00:00.000Z'\n+                          }\n+                      }\n+                  }\n+              }\n+            ];\n+\n+            var getEntitiesV2Mock = nock('https://localhost:1026')\n+                .get('/v2/entities')\n+                .query({limit: '0', offset: '1', options: 'count'})","path":"test/unit/entities-service-test.js","position":81,"original_position":81,"commit_id":"ace09f63d4beb8f447d98a1dbddec5ae97caa3bf","original_commit_id":"ff5eb2f0acf56abc862c0a3ddcea2d1974cc0d9e","user":{"login":"josecarlosaparicio","id":4552671,"avatar_url":"https://avatars1.githubusercontent.com/u/4552671?v=4","gravatar_id":"","url":"https://api.github.com/users/josecarlosaparicio","html_url":"https://github.com/josecarlosaparicio","followers_url":"https://api.github.com/users/josecarlosaparicio/followers","following_url":"https://api.github.com/users/josecarlosaparicio/following{/other_user}","gists_url":"https://api.github.com/users/josecarlosaparicio/gists{/gist_id}","starred_url":"https://api.github.com/users/josecarlosaparicio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josecarlosaparicio/subscriptions","organizations_url":"https://api.github.com/users/josecarlosaparicio/orgs","repos_url":"https://api.github.com/users/josecarlosaparicio/repos","events_url":"https://api.github.com/users/josecarlosaparicio/events{/privacy}","received_events_url":"https://api.github.com/users/josecarlosaparicio/received_events","type":"User","site_admin":false},"body":"Servicio getEntities deprecated. No se continua el desarrollo de sus test unitarios.","created_at":"2018-02-15T12:05:17Z","updated_at":"2018-02-15T12:05:17Z","html_url":"https://github.com/manucarrace/gn/pull/22#discussion_r168456307","pull_request_url":"https://api.github.com/repos/manucarrace/gn/pulls/22","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/comments/168456307"},"html":{"href":"https://github.com/manucarrace/gn/pull/22#discussion_r168456307"},"pull_request":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/22"}},"in_reply_to_id":167231728},"pull_request":{"url":"https://api.github.com/repos/manucarrace/gn/pulls/22","id":168050514,"html_url":"https://github.com/manucarrace/gn/pull/22","diff_url":"https://github.com/manucarrace/gn/pull/22.diff","patch_url":"https://github.com/manucarrace/gn/pull/22.patch","issue_url":"https://api.github.com/repos/manucarrace/gn/issues/22","number":22,"state":"open","locked":false,"title":"Feature/3 tabla entidades fe","user":{"login":"arubiogfi","id":35960308,"avatar_url":"https://avatars2.githubusercontent.com/u/35960308?v=4","gravatar_id":"","url":"https://api.github.com/users/arubiogfi","html_url":"https://github.com/arubiogfi","followers_url":"https://api.github.com/users/arubiogfi/followers","following_url":"https://api.github.com/users/arubiogfi/following{/other_user}","gists_url":"https://api.github.com/users/arubiogfi/gists{/gist_id}","starred_url":"https://api.github.com/users/arubiogfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arubiogfi/subscriptions","organizations_url":"https://api.github.com/users/arubiogfi/orgs","repos_url":"https://api.github.com/users/arubiogfi/repos","events_url":"https://api.github.com/users/arubiogfi/events{/privacy}","received_events_url":"https://api.github.com/users/arubiogfi/received_events","type":"User","site_admin":false},"body":"Implementa issue #3 #12 \r\n\r\n*Edit:* también parece que arregla el #16","created_at":"2018-02-08T18:23:59Z","updated_at":"2018-02-15T12:05:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6db4acb357e1e42933846adea2e0c6845bd21647","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/manucarrace/gn/pulls/22/commits","review_comments_url":"https://api.github.com/repos/manucarrace/gn/pulls/22/comments","review_comment_url":"https://api.github.com/repos/manucarrace/gn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manucarrace/gn/issues/22/comments","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/ace09f63d4beb8f447d98a1dbddec5ae97caa3bf","head":{"label":"manucarrace:feature/3_tabla_entidades_fe","ref":"feature/3_tabla_entidades_fe","sha":"ace09f63d4beb8f447d98a1dbddec5ae97caa3bf","user":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"repo":{"id":118124697,"name":"gn","full_name":"manucarrace/gn","owner":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manucarrace/gn","description":"dashboard para gn","fork":false,"url":"https://api.github.com/repos/manucarrace/gn","forks_url":"https://api.github.com/repos/manucarrace/gn/forks","keys_url":"https://api.github.com/repos/manucarrace/gn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manucarrace/gn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manucarrace/gn/teams","hooks_url":"https://api.github.com/repos/manucarrace/gn/hooks","issue_events_url":"https://api.github.com/repos/manucarrace/gn/issues/events{/number}","events_url":"https://api.github.com/repos/manucarrace/gn/events","assignees_url":"https://api.github.com/repos/manucarrace/gn/assignees{/user}","branches_url":"https://api.github.com/repos/manucarrace/gn/branches{/branch}","tags_url":"https://api.github.com/repos/manucarrace/gn/tags","blobs_url":"https://api.github.com/repos/manucarrace/gn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manucarrace/gn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manucarrace/gn/git/refs{/sha}","trees_url":"https://api.github.com/repos/manucarrace/gn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/{sha}","languages_url":"https://api.github.com/repos/manucarrace/gn/languages","stargazers_url":"https://api.github.com/repos/manucarrace/gn/stargazers","contributors_url":"https://api.github.com/repos/manucarrace/gn/contributors","subscribers_url":"https://api.github.com/repos/manucarrace/gn/subscribers","subscription_url":"https://api.github.com/repos/manucarrace/gn/subscription","commits_url":"https://api.github.com/repos/manucarrace/gn/commits{/sha}","git_commits_url":"https://api.github.com/repos/manucarrace/gn/git/commits{/sha}","comments_url":"https://api.github.com/repos/manucarrace/gn/comments{/number}","issue_comment_url":"https://api.github.com/repos/manucarrace/gn/issues/comments{/number}","contents_url":"https://api.github.com/repos/manucarrace/gn/contents/{+path}","compare_url":"https://api.github.com/repos/manucarrace/gn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manucarrace/gn/merges","archive_url":"https://api.github.com/repos/manucarrace/gn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manucarrace/gn/downloads","issues_url":"https://api.github.com/repos/manucarrace/gn/issues{/number}","pulls_url":"https://api.github.com/repos/manucarrace/gn/pulls{/number}","milestones_url":"https://api.github.com/repos/manucarrace/gn/milestones{/number}","notifications_url":"https://api.github.com/repos/manucarrace/gn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manucarrace/gn/labels{/name}","releases_url":"https://api.github.com/repos/manucarrace/gn/releases{/id}","deployments_url":"https://api.github.com/repos/manucarrace/gn/deployments","created_at":"2018-01-19T12:49:52Z","updated_at":"2018-02-08T09:50:35Z","pushed_at":"2018-02-15T11:47:27Z","git_url":"git://github.com/manucarrace/gn.git","ssh_url":"git@github.com:manucarrace/gn.git","clone_url":"https://github.com/manucarrace/gn.git","svn_url":"https://github.com/manucarrace/gn","homepage":null,"size":590,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"manucarrace:master","ref":"master","sha":"38bed4ec926be25447eed53d784e82390e13d4d1","user":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"repo":{"id":118124697,"name":"gn","full_name":"manucarrace/gn","owner":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manucarrace/gn","description":"dashboard para gn","fork":false,"url":"https://api.github.com/repos/manucarrace/gn","forks_url":"https://api.github.com/repos/manucarrace/gn/forks","keys_url":"https://api.github.com/repos/manucarrace/gn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manucarrace/gn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manucarrace/gn/teams","hooks_url":"https://api.github.com/repos/manucarrace/gn/hooks","issue_events_url":"https://api.github.com/repos/manucarrace/gn/issues/events{/number}","events_url":"https://api.github.com/repos/manucarrace/gn/events","assignees_url":"https://api.github.com/repos/manucarrace/gn/assignees{/user}","branches_url":"https://api.github.com/repos/manucarrace/gn/branches{/branch}","tags_url":"https://api.github.com/repos/manucarrace/gn/tags","blobs_url":"https://api.github.com/repos/manucarrace/gn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manucarrace/gn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manucarrace/gn/git/refs{/sha}","trees_url":"https://api.github.com/repos/manucarrace/gn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/{sha}","languages_url":"https://api.github.com/repos/manucarrace/gn/languages","stargazers_url":"https://api.github.com/repos/manucarrace/gn/stargazers","contributors_url":"https://api.github.com/repos/manucarrace/gn/contributors","subscribers_url":"https://api.github.com/repos/manucarrace/gn/subscribers","subscription_url":"https://api.github.com/repos/manucarrace/gn/subscription","commits_url":"https://api.github.com/repos/manucarrace/gn/commits{/sha}","git_commits_url":"https://api.github.com/repos/manucarrace/gn/git/commits{/sha}","comments_url":"https://api.github.com/repos/manucarrace/gn/comments{/number}","issue_comment_url":"https://api.github.com/repos/manucarrace/gn/issues/comments{/number}","contents_url":"https://api.github.com/repos/manucarrace/gn/contents/{+path}","compare_url":"https://api.github.com/repos/manucarrace/gn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manucarrace/gn/merges","archive_url":"https://api.github.com/repos/manucarrace/gn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manucarrace/gn/downloads","issues_url":"https://api.github.com/repos/manucarrace/gn/issues{/number}","pulls_url":"https://api.github.com/repos/manucarrace/gn/pulls{/number}","milestones_url":"https://api.github.com/repos/manucarrace/gn/milestones{/number}","notifications_url":"https://api.github.com/repos/manucarrace/gn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manucarrace/gn/labels{/name}","releases_url":"https://api.github.com/repos/manucarrace/gn/releases{/id}","deployments_url":"https://api.github.com/repos/manucarrace/gn/deployments","created_at":"2018-01-19T12:49:52Z","updated_at":"2018-02-08T09:50:35Z","pushed_at":"2018-02-15T11:47:27Z","git_url":"git://github.com/manucarrace/gn.git","ssh_url":"git@github.com:manucarrace/gn.git","clone_url":"https://github.com/manucarrace/gn.git","svn_url":"https://github.com/manucarrace/gn","homepage":null,"size":590,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/22"},"html":{"href":"https://github.com/manucarrace/gn/pull/22"},"issue":{"href":"https://api.github.com/repos/manucarrace/gn/issues/22"},"comments":{"href":"https://api.github.com/repos/manucarrace/gn/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/manucarrace/gn/statuses/ace09f63d4beb8f447d98a1dbddec5ae97caa3bf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"josecarlosaparicio"}}