{"action":"created","comment":{"url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/comments/36347961","id":36347961,"diff_hunk":"@@ -33,7 +37,22 @@ The mock method takes three arguments:\n \n The mock method executes insert, then update, and finally findOne and returns the result of findOne.\n \n-Each argument is optional and we have some smart behavior to handle non-existant arguments\n+Each argument is optional and we have some smart behavior to handle non-existant arguments:\n - `insert`, if not specified we'll grab the first part of the `update` operator\n - `update`, if not specified we'll skip the update, if a single argument is specified, we'll use the id returned by our insert operation as the first argument (the query)\n-- `find`, if not specified we'll use the id returned by our insert operation\n\\ No newline at end of file\n+- `find`, if not specified we'll use the id returned by our insert operation\n+\n+**The `mockMulti` method takes four arguments:**\n+\n+- `insert` an array of arguments to be passed to the mockCollection's insert method\n+- `update` an array of arguments to be passed to the mockCollection's update method\n+- `flags` an object to be passed to the mockCollection's update method\n+- `find` an array of arguments to be passed to the mockCollection's find method\n+\n+The mockMulti method executes insert, then update, and finally find and returns the result of find().fetch().\n+\n+Each argument is optional:\n+- `insert`, if not specified we'll grab the first part of the `update` operator\n+- `update`, if not specified we'll skip the update, if a single argument is specified, we'll use the ids returned by our insert operation as the first argument (the query)","path":"README.md","position":56,"original_position":56,"commit_id":"0e753e6e42ad94ba53465049db35e28778ebea79","original_commit_id":"0e753e6e42ad94ba53465049db35e28778ebea79","user":{"login":"cwohlman","id":4643896,"avatar_url":"https://avatars.githubusercontent.com/u/4643896?v=3","gravatar_id":"","url":"https://api.github.com/users/cwohlman","html_url":"https://github.com/cwohlman","followers_url":"https://api.github.com/users/cwohlman/followers","following_url":"https://api.github.com/users/cwohlman/following{/other_user}","gists_url":"https://api.github.com/users/cwohlman/gists{/gist_id}","starred_url":"https://api.github.com/users/cwohlman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwohlman/subscriptions","organizations_url":"https://api.github.com/users/cwohlman/orgs","repos_url":"https://api.github.com/users/cwohlman/repos","events_url":"https://api.github.com/users/cwohlman/events{/privacy}","received_events_url":"https://api.github.com/users/cwohlman/received_events","type":"User","site_admin":false},"body":"In other words, we want to make the developer explicitly specify the query for the update operation, because that's the whole point of the mockMulti (updating multiple docs which match a query).","created_at":"2015-08-05T20:09:29Z","updated_at":"2015-08-05T20:09:29Z","html_url":"https://github.com/usefulio/collection-mocks/pull/4#discussion_r36347961","pull_request_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/comments/36347961"},"html":{"href":"https://github.com/usefulio/collection-mocks/pull/4#discussion_r36347961"},"pull_request":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4","id":41685156,"html_url":"https://github.com/usefulio/collection-mocks/pull/4","diff_url":"https://github.com/usefulio/collection-mocks/pull/4.diff","patch_url":"https://github.com/usefulio/collection-mocks/pull/4.patch","issue_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/4","number":4,"state":"open","locked":false,"title":"Mocks should support the multi:true option","user":{"login":"vladbalan","id":6682744,"avatar_url":"https://avatars.githubusercontent.com/u/6682744?v=3","gravatar_id":"","url":"https://api.github.com/users/vladbalan","html_url":"https://github.com/vladbalan","followers_url":"https://api.github.com/users/vladbalan/followers","following_url":"https://api.github.com/users/vladbalan/following{/other_user}","gists_url":"https://api.github.com/users/vladbalan/gists{/gist_id}","starred_url":"https://api.github.com/users/vladbalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladbalan/subscriptions","organizations_url":"https://api.github.com/users/vladbalan/orgs","repos_url":"https://api.github.com/users/vladbalan/repos","events_url":"https://api.github.com/users/vladbalan/events{/privacy}","received_events_url":"https://api.github.com/users/vladbalan/received_events","type":"User","site_admin":false},"body":"The new mockMulti method can insert an array of documents and update them all when the `multi:true` flag is used. The method returns the results of find().fetch().","created_at":"2015-08-05T14:31:18Z","updated_at":"2015-08-05T20:09:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21f68cbc283dc0e6e9e3e051b3377c48c5d302d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4/commits","review_comments_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4/comments","review_comment_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/4/comments","statuses_url":"https://api.github.com/repos/usefulio/collection-mocks/statuses/0e753e6e42ad94ba53465049db35e28778ebea79","head":{"label":"usefulio:mockMulti","ref":"mockMulti","sha":"0e753e6e42ad94ba53465049db35e28778ebea79","user":{"login":"usefulio","id":6901332,"avatar_url":"https://avatars.githubusercontent.com/u/6901332?v=3","gravatar_id":"","url":"https://api.github.com/users/usefulio","html_url":"https://github.com/usefulio","followers_url":"https://api.github.com/users/usefulio/followers","following_url":"https://api.github.com/users/usefulio/following{/other_user}","gists_url":"https://api.github.com/users/usefulio/gists{/gist_id}","starred_url":"https://api.github.com/users/usefulio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usefulio/subscriptions","organizations_url":"https://api.github.com/users/usefulio/orgs","repos_url":"https://api.github.com/users/usefulio/repos","events_url":"https://api.github.com/users/usefulio/events{/privacy}","received_events_url":"https://api.github.com/users/usefulio/received_events","type":"Organization","site_admin":false},"repo":{"id":40149183,"name":"collection-mocks","full_name":"usefulio/collection-mocks","owner":{"login":"usefulio","id":6901332,"avatar_url":"https://avatars.githubusercontent.com/u/6901332?v=3","gravatar_id":"","url":"https://api.github.com/users/usefulio","html_url":"https://github.com/usefulio","followers_url":"https://api.github.com/users/usefulio/followers","following_url":"https://api.github.com/users/usefulio/following{/other_user}","gists_url":"https://api.github.com/users/usefulio/gists{/gist_id}","starred_url":"https://api.github.com/users/usefulio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usefulio/subscriptions","organizations_url":"https://api.github.com/users/usefulio/orgs","repos_url":"https://api.github.com/users/usefulio/repos","events_url":"https://api.github.com/users/usefulio/events{/privacy}","received_events_url":"https://api.github.com/users/usefulio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usefulio/collection-mocks","description":"A package which makes it easy to see the result of any meteor mongo operation before it happens","fork":false,"url":"https://api.github.com/repos/usefulio/collection-mocks","forks_url":"https://api.github.com/repos/usefulio/collection-mocks/forks","keys_url":"https://api.github.com/repos/usefulio/collection-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usefulio/collection-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usefulio/collection-mocks/teams","hooks_url":"https://api.github.com/repos/usefulio/collection-mocks/hooks","issue_events_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/usefulio/collection-mocks/events","assignees_url":"https://api.github.com/repos/usefulio/collection-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/usefulio/collection-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/usefulio/collection-mocks/tags","blobs_url":"https://api.github.com/repos/usefulio/collection-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usefulio/collection-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usefulio/collection-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/usefulio/collection-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usefulio/collection-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/usefulio/collection-mocks/languages","stargazers_url":"https://api.github.com/repos/usefulio/collection-mocks/stargazers","contributors_url":"https://api.github.com/repos/usefulio/collection-mocks/contributors","subscribers_url":"https://api.github.com/repos/usefulio/collection-mocks/subscribers","subscription_url":"https://api.github.com/repos/usefulio/collection-mocks/subscription","commits_url":"https://api.github.com/repos/usefulio/collection-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/usefulio/collection-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/usefulio/collection-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/usefulio/collection-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/usefulio/collection-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usefulio/collection-mocks/merges","archive_url":"https://api.github.com/repos/usefulio/collection-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usefulio/collection-mocks/downloads","issues_url":"https://api.github.com/repos/usefulio/collection-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/usefulio/collection-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/usefulio/collection-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usefulio/collection-mocks/labels{/name}","releases_url":"https://api.github.com/repos/usefulio/collection-mocks/releases{/id}","created_at":"2015-08-03T21:37:52Z","updated_at":"2015-08-04T19:51:11Z","pushed_at":"2015-08-05T14:31:18Z","git_url":"git://github.com/usefulio/collection-mocks.git","ssh_url":"git@github.com:usefulio/collection-mocks.git","clone_url":"https://github.com/usefulio/collection-mocks.git","svn_url":"https://github.com/usefulio/collection-mocks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"usefulio:master","ref":"master","sha":"e79fa2ee1ad39dccb95460796eedbcf8e0d80ff5","user":{"login":"usefulio","id":6901332,"avatar_url":"https://avatars.githubusercontent.com/u/6901332?v=3","gravatar_id":"","url":"https://api.github.com/users/usefulio","html_url":"https://github.com/usefulio","followers_url":"https://api.github.com/users/usefulio/followers","following_url":"https://api.github.com/users/usefulio/following{/other_user}","gists_url":"https://api.github.com/users/usefulio/gists{/gist_id}","starred_url":"https://api.github.com/users/usefulio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usefulio/subscriptions","organizations_url":"https://api.github.com/users/usefulio/orgs","repos_url":"https://api.github.com/users/usefulio/repos","events_url":"https://api.github.com/users/usefulio/events{/privacy}","received_events_url":"https://api.github.com/users/usefulio/received_events","type":"Organization","site_admin":false},"repo":{"id":40149183,"name":"collection-mocks","full_name":"usefulio/collection-mocks","owner":{"login":"usefulio","id":6901332,"avatar_url":"https://avatars.githubusercontent.com/u/6901332?v=3","gravatar_id":"","url":"https://api.github.com/users/usefulio","html_url":"https://github.com/usefulio","followers_url":"https://api.github.com/users/usefulio/followers","following_url":"https://api.github.com/users/usefulio/following{/other_user}","gists_url":"https://api.github.com/users/usefulio/gists{/gist_id}","starred_url":"https://api.github.com/users/usefulio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usefulio/subscriptions","organizations_url":"https://api.github.com/users/usefulio/orgs","repos_url":"https://api.github.com/users/usefulio/repos","events_url":"https://api.github.com/users/usefulio/events{/privacy}","received_events_url":"https://api.github.com/users/usefulio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usefulio/collection-mocks","description":"A package which makes it easy to see the result of any meteor mongo operation before it happens","fork":false,"url":"https://api.github.com/repos/usefulio/collection-mocks","forks_url":"https://api.github.com/repos/usefulio/collection-mocks/forks","keys_url":"https://api.github.com/repos/usefulio/collection-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usefulio/collection-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usefulio/collection-mocks/teams","hooks_url":"https://api.github.com/repos/usefulio/collection-mocks/hooks","issue_events_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/usefulio/collection-mocks/events","assignees_url":"https://api.github.com/repos/usefulio/collection-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/usefulio/collection-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/usefulio/collection-mocks/tags","blobs_url":"https://api.github.com/repos/usefulio/collection-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usefulio/collection-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usefulio/collection-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/usefulio/collection-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usefulio/collection-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/usefulio/collection-mocks/languages","stargazers_url":"https://api.github.com/repos/usefulio/collection-mocks/stargazers","contributors_url":"https://api.github.com/repos/usefulio/collection-mocks/contributors","subscribers_url":"https://api.github.com/repos/usefulio/collection-mocks/subscribers","subscription_url":"https://api.github.com/repos/usefulio/collection-mocks/subscription","commits_url":"https://api.github.com/repos/usefulio/collection-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/usefulio/collection-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/usefulio/collection-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/usefulio/collection-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/usefulio/collection-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/usefulio/collection-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usefulio/collection-mocks/merges","archive_url":"https://api.github.com/repos/usefulio/collection-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usefulio/collection-mocks/downloads","issues_url":"https://api.github.com/repos/usefulio/collection-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/usefulio/collection-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/usefulio/collection-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/usefulio/collection-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usefulio/collection-mocks/labels{/name}","releases_url":"https://api.github.com/repos/usefulio/collection-mocks/releases{/id}","created_at":"2015-08-03T21:37:52Z","updated_at":"2015-08-04T19:51:11Z","pushed_at":"2015-08-05T14:31:18Z","git_url":"git://github.com/usefulio/collection-mocks.git","ssh_url":"git@github.com:usefulio/collection-mocks.git","clone_url":"https://github.com/usefulio/collection-mocks.git","svn_url":"https://github.com/usefulio/collection-mocks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4"},"html":{"href":"https://github.com/usefulio/collection-mocks/pull/4"},"issue":{"href":"https://api.github.com/repos/usefulio/collection-mocks/issues/4"},"comments":{"href":"https://api.github.com/repos/usefulio/collection-mocks/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/usefulio/collection-mocks/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/usefulio/collection-mocks/statuses/0e753e6e42ad94ba53465049db35e28778ebea79"}}}}