{"action":"created","issue":{"url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/36","labels_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/36/comments","events_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/36/events","html_url":"https://github.com/danielspaniel/ember-data-factory-guy/issues/36","id":49658483,"number":36,"title":"Improvement: expecting specific parameters","user":{"login":"yratanov","id":1536262,"avatar_url":"https://avatars.githubusercontent.com/u/1536262?v=3","gravatar_id":"","url":"https://api.github.com/users/yratanov","html_url":"https://github.com/yratanov","followers_url":"https://api.github.com/users/yratanov/followers","following_url":"https://api.github.com/users/yratanov/following{/other_user}","gists_url":"https://api.github.com/users/yratanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yratanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yratanov/subscriptions","organizations_url":"https://api.github.com/users/yratanov/orgs","repos_url":"https://api.github.com/users/yratanov/repos","events_url":"https://api.github.com/users/yratanov/events{/privacy}","received_events_url":"https://api.github.com/users/yratanov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2014-11-21T05:27:11Z","updated_at":"2015-01-19T12:33:44Z","closed_at":"2014-12-05T08:02:11Z","body":"While writing acceptance tests for my application, I have noticed that ```handleCreate```, ```handleUpdate``` methods are pretty indifferent to what they receive.\r\nFor example we have code:\r\n```coffee\r\ntest 'create post', ->\r\n  postData = FactoryGuy.build('post')\r\n  factoryGuyHelper().handleCreate('post', postData)\r\n  # fill form with data from \"postData\" and click on submit\r\n  # assert page contains data from \"postData\" \r\n```\r\n\r\nThe problem is that we do not care what exactly has been sent to the server, we just accept anything and return post with ```postData```.\r\n\r\nWhat do you think about adding (or changing existing) methods to handle only MATCHED requests?\r\n\r\n```$.mockjax``` supports it by passing ```data``` parameter.\r\n```js\r\n$.mockjax({\r\n    url:  \"/posts\",\r\n    data: { title: \"foo\" }\r\n});\r\n```\r\nPossible API:\r\n```coffee\r\n# will now respond only if post has title \"foo\"\r\nfactoryGuyHelper().handleCreate('post', { title: \"foo\" }) \r\n```"},"comment":{"url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/comments/70486174","html_url":"https://github.com/danielspaniel/ember-data-factory-guy/issues/36#issuecomment-70486174","issue_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/36","id":70486174,"user":{"login":"yratanov","id":1536262,"avatar_url":"https://avatars.githubusercontent.com/u/1536262?v=3","gravatar_id":"","url":"https://api.github.com/users/yratanov","html_url":"https://github.com/yratanov","followers_url":"https://api.github.com/users/yratanov/followers","following_url":"https://api.github.com/users/yratanov/following{/other_user}","gists_url":"https://api.github.com/users/yratanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yratanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yratanov/subscriptions","organizations_url":"https://api.github.com/users/yratanov/orgs","repos_url":"https://api.github.com/users/yratanov/repos","events_url":"https://api.github.com/users/yratanov/events{/privacy}","received_events_url":"https://api.github.com/users/yratanov/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T12:33:44Z","updated_at":"2015-01-19T12:33:44Z","body":"@danielspaniel ok, great job!"}}