{"action":"created","comment":{"url":"https://api.github.com/repos/LocalGround/localground/pulls/comments/23445616","id":23445616,"diff_hunk":"@@ -0,0 +1,76 @@\n+define([\"underscore\",\n+        \"views/maps/basemap\",\n+        \"lib/maps/controls/geolocation\",\n+        \"lib/maps/controls/searchBox\",\n+        \"lib/maps/controls/tileController\",\n+        \"lib/maps/controls/audioPlayer\",\n+        \"../../../test/spec-helper\"],\n+    function (_, Basemap, GeoLocation, SearchControl, TileController, AudioPlayer) {\n+        'use strict';\n+        var basemap, that;\n+\n+        describe(\"Basemap: Test that basemap initializes correctly\", function () {\n+\n+            it(\"Loads correctly if valid initialization parameters passed in\", function () {\n+                that = this;\n+                expect(function () {\n+                    var opts = _.clone(that.mapEditorInitializationParams);\n+                    opts = _.extend(opts, { app: that.app });\n+                    basemap = new Basemap(opts);\n+                }).not.toThrow();\n+\n+                expect(basemap.tileManager).toEqual(jasmine.any(TileController));\n+                expect(basemap.geolocationControl).toEqual(jasmine.any(GeoLocation));\n+                expect(basemap.searchControl).toEqual(jasmine.any(SearchControl));\n+                //can't test AudioPlayer functionality unless map.idle event handler removed\n+                //expect(basemap.audioPlayer).toEqual(jasmine.any(AudioPlayer));\n+            });\n+\n+            it(\"Listens for change-zoom and change-center event handlers\", function () {\n+                //init spies:\n+                spyOn(Basemap.prototype, \"changeZoom\");\n+                spyOn(Basemap.prototype, \"changeCenter\");\n+\n+                //create basemap instance:\n+                var opts = _.clone(this.mapEditorInitializationParams);\n+                opts = _.extend(opts, { app: this.app });\n+                basemap = new Basemap(opts);\n+\n+                //trigger events and ensure that events have been called:\n+                this.app.vent.trigger('change-center');\n+                this.app.vent.trigger('change-zoom');\n+\n+                //make sure corresponding events were called:\n+                expect(basemap.changeZoom).toHaveBeenCalled();\n+                expect(basemap.changeCenter).toHaveBeenCalled();\n+            });\n+\n+        });\n+\n+        describe(\"Basemap: Internal methods work correctly\", function () {\n+\n+            //changeZoom method untestable (to my knowledge) b/c of the 'map idle' clause\n+            /*it(\"changeZoom method works\", function () {\n+                //create basemap instance:\n+                var opts = _.clone(this.mapEditorInitializationParams);\n+                opts = _.extend(opts, { app: this.app });\n+                basemap = new Basemap(opts);\n+                basemap.changeZoom(20);\n+                expect(basemap.map.getZoom()).toBe(20);\n+            });*/","path":"static/backbone/js/test/spec/views/basemap-test.js","position":60,"original_position":60,"commit_id":"5dfc4a8f1c9c7af21822ed419c98dcc4a0ac6782","original_commit_id":"5dfc4a8f1c9c7af21822ed419c98dcc4a0ac6782","user":{"login":"zmmachar","id":2395896,"avatar_url":"https://avatars.githubusercontent.com/u/2395896?v=3","gravatar_id":"","url":"https://api.github.com/users/zmmachar","html_url":"https://github.com/zmmachar","followers_url":"https://api.github.com/users/zmmachar/followers","following_url":"https://api.github.com/users/zmmachar/following{/other_user}","gists_url":"https://api.github.com/users/zmmachar/gists{/gist_id}","starred_url":"https://api.github.com/users/zmmachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmmachar/subscriptions","organizations_url":"https://api.github.com/users/zmmachar/orgs","repos_url":"https://api.github.com/users/zmmachar/repos","events_url":"https://api.github.com/users/zmmachar/events{/privacy}","received_events_url":"https://api.github.com/users/zmmachar/received_events","type":"User","site_admin":false},"body":"As stated above you might find that you have trouble testing things involving the google maps object in general.  I'm actually going to pull changeZoom out of that idle handler, though, because it doesn't quite do what I meant it to do (when you are loading the map, the first idle event fires after tiles are loaded, but if you've already loaded the map, you have to actually do something to make it fire that event.  For example, if messing around on the view modal, the map won't fire the event and the zoom won't update, etc","created_at":"2015-01-23T11:57:22Z","updated_at":"2015-01-23T11:57:22Z","html_url":"https://github.com/LocalGround/localground/pull/16#discussion_r23445616","pull_request_url":"https://api.github.com/repos/LocalGround/localground/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/comments/23445616"},"html":{"href":"https://github.com/LocalGround/localground/pull/16#discussion_r23445616"},"pull_request":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/LocalGround/localground/pulls/16","id":27858907,"html_url":"https://github.com/LocalGround/localground/pull/16","diff_url":"https://github.com/LocalGround/localground/pull/16.diff","patch_url":"https://github.com/LocalGround/localground/pull/16.patch","issue_url":"https://api.github.com/repos/LocalGround/localground/issues/16","number":16,"state":"open","locked":false,"title":"Embed view","user":{"login":"zmmachar","id":2395896,"avatar_url":"https://avatars.githubusercontent.com/u/2395896?v=3","gravatar_id":"","url":"https://api.github.com/users/zmmachar","html_url":"https://github.com/zmmachar","followers_url":"https://api.github.com/users/zmmachar/followers","following_url":"https://api.github.com/users/zmmachar/following{/other_user}","gists_url":"https://api.github.com/users/zmmachar/gists{/gist_id}","starred_url":"https://api.github.com/users/zmmachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmmachar/subscriptions","organizations_url":"https://api.github.com/users/zmmachar/orgs","repos_url":"https://api.github.com/users/zmmachar/repos","events_url":"https://api.github.com/users/zmmachar/events{/privacy}","received_events_url":"https://api.github.com/users/zmmachar/received_events","type":"User","site_admin":false},"body":"Views should work for saving/loading/viewing publicly with urls you can see in the 'share view' modal.  Might need to apachectl restart to get things working.  A couple CSS changes also","created_at":"2015-01-22T17:04:27Z","updated_at":"2015-01-23T11:57:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f129bafcea1f0aa8da08b99e84a66576c09a44b1","assignee":{"login":"vanwars","id":1214147,"avatar_url":"https://avatars.githubusercontent.com/u/1214147?v=3","gravatar_id":"","url":"https://api.github.com/users/vanwars","html_url":"https://github.com/vanwars","followers_url":"https://api.github.com/users/vanwars/followers","following_url":"https://api.github.com/users/vanwars/following{/other_user}","gists_url":"https://api.github.com/users/vanwars/gists{/gist_id}","starred_url":"https://api.github.com/users/vanwars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanwars/subscriptions","organizations_url":"https://api.github.com/users/vanwars/orgs","repos_url":"https://api.github.com/users/vanwars/repos","events_url":"https://api.github.com/users/vanwars/events{/privacy}","received_events_url":"https://api.github.com/users/vanwars/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/LocalGround/localground/pulls/16/commits","review_comments_url":"https://api.github.com/repos/LocalGround/localground/pulls/16/comments","review_comment_url":"https://api.github.com/repos/LocalGround/localground/pulls/comments/{number}","comments_url":"https://api.github.com/repos/LocalGround/localground/issues/16/comments","statuses_url":"https://api.github.com/repos/LocalGround/localground/statuses/5dfc4a8f1c9c7af21822ed419c98dcc4a0ac6782","head":{"label":"LocalGround:embed-view","ref":"embed-view","sha":"5dfc4a8f1c9c7af21822ed419c98dcc4a0ac6782","user":{"login":"LocalGround","id":2390693,"avatar_url":"https://avatars.githubusercontent.com/u/2390693?v=3","gravatar_id":"","url":"https://api.github.com/users/LocalGround","html_url":"https://github.com/LocalGround","followers_url":"https://api.github.com/users/LocalGround/followers","following_url":"https://api.github.com/users/LocalGround/following{/other_user}","gists_url":"https://api.github.com/users/LocalGround/gists{/gist_id}","starred_url":"https://api.github.com/users/LocalGround/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LocalGround/subscriptions","organizations_url":"https://api.github.com/users/LocalGround/orgs","repos_url":"https://api.github.com/users/LocalGround/repos","events_url":"https://api.github.com/users/LocalGround/events{/privacy}","received_events_url":"https://api.github.com/users/LocalGround/received_events","type":"Organization","site_admin":false},"repo":{"id":5909819,"name":"localground","full_name":"LocalGround/localground","owner":{"login":"LocalGround","id":2390693,"avatar_url":"https://avatars.githubusercontent.com/u/2390693?v=3","gravatar_id":"","url":"https://api.github.com/users/LocalGround","html_url":"https://github.com/LocalGround","followers_url":"https://api.github.com/users/LocalGround/followers","following_url":"https://api.github.com/users/LocalGround/following{/other_user}","gists_url":"https://api.github.com/users/LocalGround/gists{/gist_id}","starred_url":"https://api.github.com/users/LocalGround/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LocalGround/subscriptions","organizations_url":"https://api.github.com/users/LocalGround/orgs","repos_url":"https://api.github.com/users/LocalGround/repos","events_url":"https://api.github.com/users/LocalGround/events{/privacy}","received_events_url":"https://api.github.com/users/LocalGround/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LocalGround/localground","description":"","fork":false,"url":"https://api.github.com/repos/LocalGround/localground","forks_url":"https://api.github.com/repos/LocalGround/localground/forks","keys_url":"https://api.github.com/repos/LocalGround/localground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LocalGround/localground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LocalGround/localground/teams","hooks_url":"https://api.github.com/repos/LocalGround/localground/hooks","issue_events_url":"https://api.github.com/repos/LocalGround/localground/issues/events{/number}","events_url":"https://api.github.com/repos/LocalGround/localground/events","assignees_url":"https://api.github.com/repos/LocalGround/localground/assignees{/user}","branches_url":"https://api.github.com/repos/LocalGround/localground/branches{/branch}","tags_url":"https://api.github.com/repos/LocalGround/localground/tags","blobs_url":"https://api.github.com/repos/LocalGround/localground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LocalGround/localground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LocalGround/localground/git/refs{/sha}","trees_url":"https://api.github.com/repos/LocalGround/localground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LocalGround/localground/statuses/{sha}","languages_url":"https://api.github.com/repos/LocalGround/localground/languages","stargazers_url":"https://api.github.com/repos/LocalGround/localground/stargazers","contributors_url":"https://api.github.com/repos/LocalGround/localground/contributors","subscribers_url":"https://api.github.com/repos/LocalGround/localground/subscribers","subscription_url":"https://api.github.com/repos/LocalGround/localground/subscription","commits_url":"https://api.github.com/repos/LocalGround/localground/commits{/sha}","git_commits_url":"https://api.github.com/repos/LocalGround/localground/git/commits{/sha}","comments_url":"https://api.github.com/repos/LocalGround/localground/comments{/number}","issue_comment_url":"https://api.github.com/repos/LocalGround/localground/issues/comments/{number}","contents_url":"https://api.github.com/repos/LocalGround/localground/contents/{+path}","compare_url":"https://api.github.com/repos/LocalGround/localground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LocalGround/localground/merges","archive_url":"https://api.github.com/repos/LocalGround/localground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LocalGround/localground/downloads","issues_url":"https://api.github.com/repos/LocalGround/localground/issues{/number}","pulls_url":"https://api.github.com/repos/LocalGround/localground/pulls{/number}","milestones_url":"https://api.github.com/repos/LocalGround/localground/milestones{/number}","notifications_url":"https://api.github.com/repos/LocalGround/localground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LocalGround/localground/labels{/name}","releases_url":"https://api.github.com/repos/LocalGround/localground/releases{/id}","created_at":"2012-09-22T02:58:05Z","updated_at":"2015-01-22T15:03:52Z","pushed_at":"2015-01-23T05:52:59Z","git_url":"git://github.com/LocalGround/localground.git","ssh_url":"git@github.com:LocalGround/localground.git","clone_url":"https://github.com/LocalGround/localground.git","svn_url":"https://github.com/LocalGround/localground","homepage":null,"size":18668,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":9,"default_branch":"master"}},"base":{"label":"LocalGround:master","ref":"master","sha":"a43cc13bf8ca0dc7f92b571be62297ab2b0d7add","user":{"login":"LocalGround","id":2390693,"avatar_url":"https://avatars.githubusercontent.com/u/2390693?v=3","gravatar_id":"","url":"https://api.github.com/users/LocalGround","html_url":"https://github.com/LocalGround","followers_url":"https://api.github.com/users/LocalGround/followers","following_url":"https://api.github.com/users/LocalGround/following{/other_user}","gists_url":"https://api.github.com/users/LocalGround/gists{/gist_id}","starred_url":"https://api.github.com/users/LocalGround/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LocalGround/subscriptions","organizations_url":"https://api.github.com/users/LocalGround/orgs","repos_url":"https://api.github.com/users/LocalGround/repos","events_url":"https://api.github.com/users/LocalGround/events{/privacy}","received_events_url":"https://api.github.com/users/LocalGround/received_events","type":"Organization","site_admin":false},"repo":{"id":5909819,"name":"localground","full_name":"LocalGround/localground","owner":{"login":"LocalGround","id":2390693,"avatar_url":"https://avatars.githubusercontent.com/u/2390693?v=3","gravatar_id":"","url":"https://api.github.com/users/LocalGround","html_url":"https://github.com/LocalGround","followers_url":"https://api.github.com/users/LocalGround/followers","following_url":"https://api.github.com/users/LocalGround/following{/other_user}","gists_url":"https://api.github.com/users/LocalGround/gists{/gist_id}","starred_url":"https://api.github.com/users/LocalGround/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LocalGround/subscriptions","organizations_url":"https://api.github.com/users/LocalGround/orgs","repos_url":"https://api.github.com/users/LocalGround/repos","events_url":"https://api.github.com/users/LocalGround/events{/privacy}","received_events_url":"https://api.github.com/users/LocalGround/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LocalGround/localground","description":"","fork":false,"url":"https://api.github.com/repos/LocalGround/localground","forks_url":"https://api.github.com/repos/LocalGround/localground/forks","keys_url":"https://api.github.com/repos/LocalGround/localground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LocalGround/localground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LocalGround/localground/teams","hooks_url":"https://api.github.com/repos/LocalGround/localground/hooks","issue_events_url":"https://api.github.com/repos/LocalGround/localground/issues/events{/number}","events_url":"https://api.github.com/repos/LocalGround/localground/events","assignees_url":"https://api.github.com/repos/LocalGround/localground/assignees{/user}","branches_url":"https://api.github.com/repos/LocalGround/localground/branches{/branch}","tags_url":"https://api.github.com/repos/LocalGround/localground/tags","blobs_url":"https://api.github.com/repos/LocalGround/localground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LocalGround/localground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LocalGround/localground/git/refs{/sha}","trees_url":"https://api.github.com/repos/LocalGround/localground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LocalGround/localground/statuses/{sha}","languages_url":"https://api.github.com/repos/LocalGround/localground/languages","stargazers_url":"https://api.github.com/repos/LocalGround/localground/stargazers","contributors_url":"https://api.github.com/repos/LocalGround/localground/contributors","subscribers_url":"https://api.github.com/repos/LocalGround/localground/subscribers","subscription_url":"https://api.github.com/repos/LocalGround/localground/subscription","commits_url":"https://api.github.com/repos/LocalGround/localground/commits{/sha}","git_commits_url":"https://api.github.com/repos/LocalGround/localground/git/commits{/sha}","comments_url":"https://api.github.com/repos/LocalGround/localground/comments{/number}","issue_comment_url":"https://api.github.com/repos/LocalGround/localground/issues/comments/{number}","contents_url":"https://api.github.com/repos/LocalGround/localground/contents/{+path}","compare_url":"https://api.github.com/repos/LocalGround/localground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LocalGround/localground/merges","archive_url":"https://api.github.com/repos/LocalGround/localground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LocalGround/localground/downloads","issues_url":"https://api.github.com/repos/LocalGround/localground/issues{/number}","pulls_url":"https://api.github.com/repos/LocalGround/localground/pulls{/number}","milestones_url":"https://api.github.com/repos/LocalGround/localground/milestones{/number}","notifications_url":"https://api.github.com/repos/LocalGround/localground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LocalGround/localground/labels{/name}","releases_url":"https://api.github.com/repos/LocalGround/localground/releases{/id}","created_at":"2012-09-22T02:58:05Z","updated_at":"2015-01-22T15:03:52Z","pushed_at":"2015-01-23T05:52:59Z","git_url":"git://github.com/LocalGround/localground.git","ssh_url":"git@github.com:LocalGround/localground.git","clone_url":"https://github.com/LocalGround/localground.git","svn_url":"https://github.com/LocalGround/localground","homepage":null,"size":18668,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/16"},"html":{"href":"https://github.com/LocalGround/localground/pull/16"},"issue":{"href":"https://api.github.com/repos/LocalGround/localground/issues/16"},"comments":{"href":"https://api.github.com/repos/LocalGround/localground/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/LocalGround/localground/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/LocalGround/localground/statuses/5dfc4a8f1c9c7af21822ed419c98dcc4a0ac6782"}}}}