{"action":"created","comment":{"url":"https://api.github.com/repos/dylants/price-finder/pulls/comments/53729886","id":53729886,"diff_hunk":"@@ -0,0 +1,101 @@\n+'use strict';\n+\n+const InfibeamSite = require('../../../lib/sites/infibeam');\n+const cheerio = require('cheerio');\n+const siteUtils = require('../../../lib/site-utils');\n+\n+const VALID_URI = 'http://www.infibeam.com/Home_Entertainment/sansui-sjx22fb-full-hd-led-tv/P-hoen-68091831042-cat-z.html#variantId=P-hoen-60492354794';\n+const INVALID_URI = 'http://www.bad.com/123/product';\n+\n+describe('The Infibeam Site', () => {\n+  it('should exist', () => {\n+    expect(InfibeamSite).toBeDefined();\n+  });\n+\n+  describe('isSite() function', () => {\n+    it('should return true for a correct site', () => {\n+      expect(InfibeamSite.isSite(VALID_URI)).toBeTruthy();\n+    });\n+\n+    it('should return false for a bad site', () => {\n+      expect(InfibeamSite.isSite(INVALID_URI)).toBeFalsy();\n+    });\n+  });\n+\n+  it('should throw an exception trying to create a new site with an incorrect uri', () => {\n+    expect(() => {\n+      /* eslint-disable no-new */\n+      new InfibeamSite(INVALID_URI);\n+      /* eslint-enable no-new */\n+    }).toThrow();\n+  });\n+\n+  describe('a new Infibeam Site', () => {\n+    let site;\n+\n+    beforeEach(() => {\n+      site = new InfibeamSite(VALID_URI);\n+    });\n+\n+    it('should exist', () => {\n+      expect(site).toBeDefined();\n+    });\n+\n+    it('should return the same URI for getURIForPageData()', () => {\n+      expect(site.getURIForPageData()).toEqual(VALID_URI);\n+    });\n+\n+    it('should return false for isJSON()', () => {\n+      expect(site.isJSON()).toBeFalsy();\n+    });\n+\n+    describe('with a populated page', () => {\n+      let $;\n+      let bad$;\n+      let price;\n+      let category;\n+      let name;\n+\n+      beforeEach(() => {\n+        price = 9444;\n+        category = siteUtils.categories.ELECTRONICS;\n+        name = 'Sansui SJX22FB Full HD LED TV';\n+\n+        // TODO provide content for unit test here!","path":"test/unit/sites/infibeam-test.js","position":64,"original_position":64,"commit_id":"c41d6123284fc2d9875fe21cecd3a3a3e499d195","original_commit_id":"c41d6123284fc2d9875fe21cecd3a3a3e499d195","user":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"body":"Please take out this `TODO` statement","created_at":"2016-02-23T02:44:01Z","updated_at":"2016-02-23T02:44:01Z","html_url":"https://github.com/dylants/price-finder/pull/54#discussion_r53729886","pull_request_url":"https://api.github.com/repos/dylants/price-finder/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/comments/53729886"},"html":{"href":"https://github.com/dylants/price-finder/pull/54#discussion_r53729886"},"pull_request":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/dylants/price-finder/pulls/54","id":60058812,"html_url":"https://github.com/dylants/price-finder/pull/54","diff_url":"https://github.com/dylants/price-finder/pull/54.diff","patch_url":"https://github.com/dylants/price-finder/pull/54.patch","issue_url":"https://api.github.com/repos/dylants/price-finder/issues/54","number":54,"state":"open","locked":false,"title":"Infibeam Support","user":{"login":"rajkumarpb","id":3139646,"avatar_url":"https://avatars.githubusercontent.com/u/3139646?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkumarpb","html_url":"https://github.com/rajkumarpb","followers_url":"https://api.github.com/users/rajkumarpb/followers","following_url":"https://api.github.com/users/rajkumarpb/following{/other_user}","gists_url":"https://api.github.com/users/rajkumarpb/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkumarpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkumarpb/subscriptions","organizations_url":"https://api.github.com/users/rajkumarpb/orgs","repos_url":"https://api.github.com/users/rajkumarpb/repos","events_url":"https://api.github.com/users/rajkumarpb/events{/privacy}","received_events_url":"https://api.github.com/users/rajkumarpb/received_events","type":"User","site_admin":false},"body":"1. Moved price logic to site-utils\r\n2. Added missing values in e2e test!","created_at":"2016-02-20T20:14:18Z","updated_at":"2016-02-23T02:44:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5f79a199c889df1437cff74c5d689c74c5a7959","assignee":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dylants/price-finder/milestones/1","html_url":"https://github.com/dylants/price-finder/milestones/3.1.0","labels_url":"https://api.github.com/repos/dylants/price-finder/milestones/1/labels","id":1594327,"number":1,"title":"3.1.0","description":"","creator":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":6,"state":"open","created_at":"2016-02-20T01:48:28Z","updated_at":"2016-02-21T19:30:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dylants/price-finder/pulls/54/commits","review_comments_url":"https://api.github.com/repos/dylants/price-finder/pulls/54/comments","review_comment_url":"https://api.github.com/repos/dylants/price-finder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dylants/price-finder/issues/54/comments","statuses_url":"https://api.github.com/repos/dylants/price-finder/statuses/c41d6123284fc2d9875fe21cecd3a3a3e499d195","head":{"label":"rajkumarpb:master","ref":"master","sha":"c41d6123284fc2d9875fe21cecd3a3a3e499d195","user":{"login":"rajkumarpb","id":3139646,"avatar_url":"https://avatars.githubusercontent.com/u/3139646?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkumarpb","html_url":"https://github.com/rajkumarpb","followers_url":"https://api.github.com/users/rajkumarpb/followers","following_url":"https://api.github.com/users/rajkumarpb/following{/other_user}","gists_url":"https://api.github.com/users/rajkumarpb/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkumarpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkumarpb/subscriptions","organizations_url":"https://api.github.com/users/rajkumarpb/orgs","repos_url":"https://api.github.com/users/rajkumarpb/repos","events_url":"https://api.github.com/users/rajkumarpb/events{/privacy}","received_events_url":"https://api.github.com/users/rajkumarpb/received_events","type":"User","site_admin":false},"repo":{"id":52067175,"name":"price-finder","full_name":"rajkumarpb/price-finder","owner":{"login":"rajkumarpb","id":3139646,"avatar_url":"https://avatars.githubusercontent.com/u/3139646?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkumarpb","html_url":"https://github.com/rajkumarpb","followers_url":"https://api.github.com/users/rajkumarpb/followers","following_url":"https://api.github.com/users/rajkumarpb/following{/other_user}","gists_url":"https://api.github.com/users/rajkumarpb/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkumarpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkumarpb/subscriptions","organizations_url":"https://api.github.com/users/rajkumarpb/orgs","repos_url":"https://api.github.com/users/rajkumarpb/repos","events_url":"https://api.github.com/users/rajkumarpb/events{/privacy}","received_events_url":"https://api.github.com/users/rajkumarpb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajkumarpb/price-finder","description":"Finds the prices of retail items online","fork":true,"url":"https://api.github.com/repos/rajkumarpb/price-finder","forks_url":"https://api.github.com/repos/rajkumarpb/price-finder/forks","keys_url":"https://api.github.com/repos/rajkumarpb/price-finder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajkumarpb/price-finder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajkumarpb/price-finder/teams","hooks_url":"https://api.github.com/repos/rajkumarpb/price-finder/hooks","issue_events_url":"https://api.github.com/repos/rajkumarpb/price-finder/issues/events{/number}","events_url":"https://api.github.com/repos/rajkumarpb/price-finder/events","assignees_url":"https://api.github.com/repos/rajkumarpb/price-finder/assignees{/user}","branches_url":"https://api.github.com/repos/rajkumarpb/price-finder/branches{/branch}","tags_url":"https://api.github.com/repos/rajkumarpb/price-finder/tags","blobs_url":"https://api.github.com/repos/rajkumarpb/price-finder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajkumarpb/price-finder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajkumarpb/price-finder/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajkumarpb/price-finder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajkumarpb/price-finder/statuses/{sha}","languages_url":"https://api.github.com/repos/rajkumarpb/price-finder/languages","stargazers_url":"https://api.github.com/repos/rajkumarpb/price-finder/stargazers","contributors_url":"https://api.github.com/repos/rajkumarpb/price-finder/contributors","subscribers_url":"https://api.github.com/repos/rajkumarpb/price-finder/subscribers","subscription_url":"https://api.github.com/repos/rajkumarpb/price-finder/subscription","commits_url":"https://api.github.com/repos/rajkumarpb/price-finder/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajkumarpb/price-finder/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajkumarpb/price-finder/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajkumarpb/price-finder/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajkumarpb/price-finder/contents/{+path}","compare_url":"https://api.github.com/repos/rajkumarpb/price-finder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajkumarpb/price-finder/merges","archive_url":"https://api.github.com/repos/rajkumarpb/price-finder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajkumarpb/price-finder/downloads","issues_url":"https://api.github.com/repos/rajkumarpb/price-finder/issues{/number}","pulls_url":"https://api.github.com/repos/rajkumarpb/price-finder/pulls{/number}","milestones_url":"https://api.github.com/repos/rajkumarpb/price-finder/milestones{/number}","notifications_url":"https://api.github.com/repos/rajkumarpb/price-finder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajkumarpb/price-finder/labels{/name}","releases_url":"https://api.github.com/repos/rajkumarpb/price-finder/releases{/id}","deployments_url":"https://api.github.com/repos/rajkumarpb/price-finder/deployments","created_at":"2016-02-19T06:39:57Z","updated_at":"2016-02-19T06:39:57Z","pushed_at":"2016-02-22T05:02:29Z","git_url":"git://github.com/rajkumarpb/price-finder.git","ssh_url":"git@github.com:rajkumarpb/price-finder.git","clone_url":"https://github.com/rajkumarpb/price-finder.git","svn_url":"https://github.com/rajkumarpb/price-finder","homepage":null,"size":211,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dylants:master","ref":"master","sha":"00ae1592a06d41edbea33d77207765cdb4a4425c","user":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"repo":{"id":18691189,"name":"price-finder","full_name":"dylants/price-finder","owner":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dylants/price-finder","description":"Finds the prices of retail items online","fork":false,"url":"https://api.github.com/repos/dylants/price-finder","forks_url":"https://api.github.com/repos/dylants/price-finder/forks","keys_url":"https://api.github.com/repos/dylants/price-finder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dylants/price-finder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dylants/price-finder/teams","hooks_url":"https://api.github.com/repos/dylants/price-finder/hooks","issue_events_url":"https://api.github.com/repos/dylants/price-finder/issues/events{/number}","events_url":"https://api.github.com/repos/dylants/price-finder/events","assignees_url":"https://api.github.com/repos/dylants/price-finder/assignees{/user}","branches_url":"https://api.github.com/repos/dylants/price-finder/branches{/branch}","tags_url":"https://api.github.com/repos/dylants/price-finder/tags","blobs_url":"https://api.github.com/repos/dylants/price-finder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dylants/price-finder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dylants/price-finder/git/refs{/sha}","trees_url":"https://api.github.com/repos/dylants/price-finder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dylants/price-finder/statuses/{sha}","languages_url":"https://api.github.com/repos/dylants/price-finder/languages","stargazers_url":"https://api.github.com/repos/dylants/price-finder/stargazers","contributors_url":"https://api.github.com/repos/dylants/price-finder/contributors","subscribers_url":"https://api.github.com/repos/dylants/price-finder/subscribers","subscription_url":"https://api.github.com/repos/dylants/price-finder/subscription","commits_url":"https://api.github.com/repos/dylants/price-finder/commits{/sha}","git_commits_url":"https://api.github.com/repos/dylants/price-finder/git/commits{/sha}","comments_url":"https://api.github.com/repos/dylants/price-finder/comments{/number}","issue_comment_url":"https://api.github.com/repos/dylants/price-finder/issues/comments{/number}","contents_url":"https://api.github.com/repos/dylants/price-finder/contents/{+path}","compare_url":"https://api.github.com/repos/dylants/price-finder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dylants/price-finder/merges","archive_url":"https://api.github.com/repos/dylants/price-finder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dylants/price-finder/downloads","issues_url":"https://api.github.com/repos/dylants/price-finder/issues{/number}","pulls_url":"https://api.github.com/repos/dylants/price-finder/pulls{/number}","milestones_url":"https://api.github.com/repos/dylants/price-finder/milestones{/number}","notifications_url":"https://api.github.com/repos/dylants/price-finder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dylants/price-finder/labels{/name}","releases_url":"https://api.github.com/repos/dylants/price-finder/releases{/id}","deployments_url":"https://api.github.com/repos/dylants/price-finder/deployments","created_at":"2014-04-11T23:01:30Z","updated_at":"2016-02-13T19:06:49Z","pushed_at":"2016-02-22T05:02:30Z","git_url":"git://github.com/dylants/price-finder.git","ssh_url":"git@github.com:dylants/price-finder.git","clone_url":"https://github.com/dylants/price-finder.git","svn_url":"https://github.com/dylants/price-finder","homepage":null,"size":222,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/54"},"html":{"href":"https://github.com/dylants/price-finder/pull/54"},"issue":{"href":"https://api.github.com/repos/dylants/price-finder/issues/54"},"comments":{"href":"https://api.github.com/repos/dylants/price-finder/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dylants/price-finder/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/dylants/price-finder/statuses/c41d6123284fc2d9875fe21cecd3a3a3e499d195"}}}}