GitHub PullRequestReviewCommentEvent at 2014-10-03 07:16:09
Repository: jquery-xblock
Actor: antoviaque
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/comments/18383782","id":18383782,"diff_hunk":"@@ -239,4 +240,48 @@ describe('jquery-xblock', function() {\n \n     });\n \n+    describe('enable-useCurrentHost', function() {\n+\n+        before(function() {\n+            $('.courseware-content').xblock(getDefaultConfig(function(config) {\n+                delete config.sessionId;\n+                delete config.baseDomain;\n+                delete config.lmsSubDomain;\n+                config.useCurrentHost = true;\n+            }));\n+        });\n+\n+        it(\"has loaded a xblock\", function() {\n+            expect($('.courseware-content .xblock')).to.have.length(1);\n+        });\n+\n+    });\n+\n+    describe('enable-global-options', function() {\n+\n+        beforeEach(function() {\n+            $('.courseware-content').empty();\n+        });\n+\n+        it(\"has loaded the first xblock with options\", function() {\n+            $('.courseware-content').xblock(getDefaultConfig(function(config) {\n+                config.disableGlobalOptions = false;\n+            }));\n+\n+            expect($('.courseware-content .xblock')).to.have.length(1);\n+        });\n+\n+        it(\"has loaded the second xblock without options\", function() {\n+            $('.courseware-content').xblock(getDefaultConfig(function(config) {\n+                delete config.sessionId;\n+                delete config.baseDomain;\n+                delete config.lmsSubDomain;\n+                config.disableGlobalOptions = false;\n+            }));\n+\n+            expect($('.courseware-content .xblock')).to.have.length(1);\n+        });\n+\n+    });","path":"test/test.jquery-xblock.js","position":69,"original_position":56,"commit_id":"ea10714b4369507dc718d3d36b7452bdb5385cd7","original_commit_id":"de3835687e917fd1acefe2fd6520eb1c87d01b84","user":{"login":"antoviaque","id":514483,"avatar_url":"https://avatars.githubusercontent.com/u/514483?v=2","gravatar_id":"","url":"https://api.github.com/users/antoviaque","html_url":"https://github.com/antoviaque","followers_url":"https://api.github.com/users/antoviaque/followers","following_url":"https://api.github.com/users/antoviaque/following{/other_user}","gists_url":"https://api.github.com/users/antoviaque/gists{/gist_id}","starred_url":"https://api.github.com/users/antoviaque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoviaque/subscriptions","organizations_url":"https://api.github.com/users/antoviaque/orgs","repos_url":"https://api.github.com/users/antoviaque/repos","events_url":"https://api.github.com/users/antoviaque/events{/privacy}","received_events_url":"https://api.github.com/users/antoviaque/received_events","type":"User","site_admin":false},"body":"You can, you simply have to catch the parameter on one of the function calls - for example, by temporarily mocking $.xblock.eventsInit, and checking the call parameters made on that function.","created_at":"2014-10-03T07:16:09Z","updated_at":"2014-10-03T07:16:09Z","html_url":"https://github.com/edx-solutions/jquery-xblock/pull/12#discussion_r18383782","pull_request_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/comments/18383782"},"html":{"href":"https://github.com/edx-solutions/jquery-xblock/pull/12#discussion_r18383782"},"pull_request":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12","id":22071172,"html_url":"https://github.com/edx-solutions/jquery-xblock/pull/12","diff_url":"https://github.com/edx-solutions/jquery-xblock/pull/12.diff","patch_url":"https://github.com/edx-solutions/jquery-xblock/pull/12.patch","issue_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/12","number":12,"state":"open","locked":false,"title":"Add tests for useCurrentHost and disableGlobalOptions","user":{"login":"aboudreault","id":532356,"avatar_url":"https://avatars.githubusercontent.com/u/532356?v=2","gravatar_id":"","url":"https://api.github.com/users/aboudreault","html_url":"https://github.com/aboudreault","followers_url":"https://api.github.com/users/aboudreault/followers","following_url":"https://api.github.com/users/aboudreault/following{/other_user}","gists_url":"https://api.github.com/users/aboudreault/gists{/gist_id}","starred_url":"https://api.github.com/users/aboudreault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboudreault/subscriptions","organizations_url":"https://api.github.com/users/aboudreault/orgs","repos_url":"https://api.github.com/users/aboudreault/repos","events_url":"https://api.github.com/users/aboudreault/events{/privacy}","received_events_url":"https://api.github.com/users/aboudreault/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-01T13:08:04Z","updated_at":"2014-10-03T07:16:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23379e3e24729f9979ee86f826b6441228cc7532","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12/commits","review_comments_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12/comments","review_comment_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/comments/{number}","comments_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/12/comments","statuses_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/statuses/ea10714b4369507dc718d3d36b7452bdb5385cd7","head":{"label":"aboudreault:add-new-options-tests","ref":"add-new-options-tests","sha":"ea10714b4369507dc718d3d36b7452bdb5385cd7","user":{"login":"aboudreault","id":532356,"avatar_url":"https://avatars.githubusercontent.com/u/532356?v=2","gravatar_id":"","url":"https://api.github.com/users/aboudreault","html_url":"https://github.com/aboudreault","followers_url":"https://api.github.com/users/aboudreault/followers","following_url":"https://api.github.com/users/aboudreault/following{/other_user}","gists_url":"https://api.github.com/users/aboudreault/gists{/gist_id}","starred_url":"https://api.github.com/users/aboudreault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboudreault/subscriptions","organizations_url":"https://api.github.com/users/aboudreault/orgs","repos_url":"https://api.github.com/users/aboudreault/repos","events_url":"https://api.github.com/users/aboudreault/events{/privacy}","received_events_url":"https://api.github.com/users/aboudreault/received_events","type":"User","site_admin":false},"repo":{"id":18879700,"name":"jquery-xblock","full_name":"aboudreault/jquery-xblock","owner":{"login":"aboudreault","id":532356,"avatar_url":"https://avatars.githubusercontent.com/u/532356?v=2","gravatar_id":"","url":"https://api.github.com/users/aboudreault","html_url":"https://github.com/aboudreault","followers_url":"https://api.github.com/users/aboudreault/followers","following_url":"https://api.github.com/users/aboudreault/following{/other_user}","gists_url":"https://api.github.com/users/aboudreault/gists{/gist_id}","starred_url":"https://api.github.com/users/aboudreault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboudreault/subscriptions","organizations_url":"https://api.github.com/users/aboudreault/orgs","repos_url":"https://api.github.com/users/aboudreault/repos","events_url":"https://api.github.com/users/aboudreault/events{/privacy}","received_events_url":"https://api.github.com/users/aboudreault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aboudreault/jquery-xblock","description":"jQuery plugin to load XBlocks remotely","fork":true,"url":"https://api.github.com/repos/aboudreault/jquery-xblock","forks_url":"https://api.github.com/repos/aboudreault/jquery-xblock/forks","keys_url":"https://api.github.com/repos/aboudreault/jquery-xblock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aboudreault/jquery-xblock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aboudreault/jquery-xblock/teams","hooks_url":"https://api.github.com/repos/aboudreault/jquery-xblock/hooks","issue_events_url":"https://api.github.com/repos/aboudreault/jquery-xblock/issues/events{/number}","events_url":"https://api.github.com/repos/aboudreault/jquery-xblock/events","assignees_url":"https://api.github.com/repos/aboudreault/jquery-xblock/assignees{/user}","branches_url":"https://api.github.com/repos/aboudreault/jquery-xblock/branches{/branch}","tags_url":"https://api.github.com/repos/aboudreault/jquery-xblock/tags","blobs_url":"https://api.github.com/repos/aboudreault/jquery-xblock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aboudreault/jquery-xblock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aboudreault/jquery-xblock/git/refs{/sha}","trees_url":"https://api.github.com/repos/aboudreault/jquery-xblock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aboudreault/jquery-xblock/statuses/{sha}","languages_url":"https://api.github.com/repos/aboudreault/jquery-xblock/languages","stargazers_url":"https://api.github.com/repos/aboudreault/jquery-xblock/stargazers","contributors_url":"https://api.github.com/repos/aboudreault/jquery-xblock/contributors","subscribers_url":"https://api.github.com/repos/aboudreault/jquery-xblock/subscribers","subscription_url":"https://api.github.com/repos/aboudreault/jquery-xblock/subscription","commits_url":"https://api.github.com/repos/aboudreault/jquery-xblock/commits{/sha}","git_commits_url":"https://api.github.com/repos/aboudreault/jquery-xblock/git/commits{/sha}","comments_url":"https://api.github.com/repos/aboudreault/jquery-xblock/comments{/number}","issue_comment_url":"https://api.github.com/repos/aboudreault/jquery-xblock/issues/comments/{number}","contents_url":"https://api.github.com/repos/aboudreault/jquery-xblock/contents/{+path}","compare_url":"https://api.github.com/repos/aboudreault/jquery-xblock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aboudreault/jquery-xblock/merges","archive_url":"https://api.github.com/repos/aboudreault/jquery-xblock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aboudreault/jquery-xblock/downloads","issues_url":"https://api.github.com/repos/aboudreault/jquery-xblock/issues{/number}","pulls_url":"https://api.github.com/repos/aboudreault/jquery-xblock/pulls{/number}","milestones_url":"https://api.github.com/repos/aboudreault/jquery-xblock/milestones{/number}","notifications_url":"https://api.github.com/repos/aboudreault/jquery-xblock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aboudreault/jquery-xblock/labels{/name}","releases_url":"https://api.github.com/repos/aboudreault/jquery-xblock/releases{/id}","created_at":"2014-04-17T13:43:58Z","updated_at":"2014-05-17T15:26:16Z","pushed_at":"2014-10-02T13:40:59Z","git_url":"git://github.com/aboudreault/jquery-xblock.git","ssh_url":"git@github.com:aboudreault/jquery-xblock.git","clone_url":"https://github.com/aboudreault/jquery-xblock.git","svn_url":"https://github.com/aboudreault/jquery-xblock","homepage":null,"size":278,"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":"edx-solutions:master","ref":"master","sha":"d9b5778cc89976ae0f4a646c2b39697bee9ac17f","user":{"login":"edx-solutions","id":6585054,"avatar_url":"https://avatars.githubusercontent.com/u/6585054?v=2","gravatar_id":"","url":"https://api.github.com/users/edx-solutions","html_url":"https://github.com/edx-solutions","followers_url":"https://api.github.com/users/edx-solutions/followers","following_url":"https://api.github.com/users/edx-solutions/following{/other_user}","gists_url":"https://api.github.com/users/edx-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/edx-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx-solutions/subscriptions","organizations_url":"https://api.github.com/users/edx-solutions/orgs","repos_url":"https://api.github.com/users/edx-solutions/repos","events_url":"https://api.github.com/users/edx-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/edx-solutions/received_events","type":"Organization","site_admin":false},"repo":{"id":18155391,"name":"jquery-xblock","full_name":"edx-solutions/jquery-xblock","owner":{"login":"edx-solutions","id":6585054,"avatar_url":"https://avatars.githubusercontent.com/u/6585054?v=2","gravatar_id":"","url":"https://api.github.com/users/edx-solutions","html_url":"https://github.com/edx-solutions","followers_url":"https://api.github.com/users/edx-solutions/followers","following_url":"https://api.github.com/users/edx-solutions/following{/other_user}","gists_url":"https://api.github.com/users/edx-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/edx-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx-solutions/subscriptions","organizations_url":"https://api.github.com/users/edx-solutions/orgs","repos_url":"https://api.github.com/users/edx-solutions/repos","events_url":"https://api.github.com/users/edx-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/edx-solutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx-solutions/jquery-xblock","description":"jQuery plugin to load XBlocks remotely","fork":false,"url":"https://api.github.com/repos/edx-solutions/jquery-xblock","forks_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/forks","keys_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/teams","hooks_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/hooks","issue_events_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/events{/number}","events_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/events","assignees_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/assignees{/user}","branches_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/branches{/branch}","tags_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/tags","blobs_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/statuses/{sha}","languages_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/languages","stargazers_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/stargazers","contributors_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/contributors","subscribers_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/subscribers","subscription_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/subscription","commits_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/comments/{number}","contents_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/contents/{+path}","compare_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/merges","archive_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/downloads","issues_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues{/number}","pulls_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls{/number}","milestones_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/milestones{/number}","notifications_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/labels{/name}","releases_url":"https://api.github.com/repos/edx-solutions/jquery-xblock/releases{/id}","created_at":"2014-03-26T21:57:57Z","updated_at":"2014-09-19T09:27:10Z","pushed_at":"2014-09-25T05:11:17Z","git_url":"git://github.com/edx-solutions/jquery-xblock.git","ssh_url":"git@github.com:edx-solutions/jquery-xblock.git","clone_url":"https://github.com/edx-solutions/jquery-xblock.git","svn_url":"https://github.com/edx-solutions/jquery-xblock","homepage":null,"size":369,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12"},"html":{"href":"https://github.com/edx-solutions/jquery-xblock/pull/12"},"issue":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/12"},"comments":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/edx-solutions/jquery-xblock/statuses/ea10714b4369507dc718d3d36b7452bdb5385cd7"}}}}