{"action":"created","issue":{"url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/331","repository_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy","labels_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/331/comments","events_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/331/events","html_url":"https://github.com/danielspaniel/ember-data-factory-guy/issues/331","id":300281421,"number":331,"title":"Unable to re-mock","user":{"login":"Exelord","id":1469375,"avatar_url":"https://avatars1.githubusercontent.com/u/1469375?v=4","gravatar_id":"","url":"https://api.github.com/users/Exelord","html_url":"https://github.com/Exelord","followers_url":"https://api.github.com/users/Exelord/followers","following_url":"https://api.github.com/users/Exelord/following{/other_user}","gists_url":"https://api.github.com/users/Exelord/gists{/gist_id}","starred_url":"https://api.github.com/users/Exelord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Exelord/subscriptions","organizations_url":"https://api.github.com/users/Exelord/orgs","repos_url":"https://api.github.com/users/Exelord/repos","events_url":"https://api.github.com/users/Exelord/events{/privacy}","received_events_url":"https://api.github.com/users/Exelord/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-26T15:27:54Z","updated_at":"2018-02-27T01:15:57Z","closed_at":"2018-02-26T16:04:20Z","author_association":"NONE","body":"Hey @danielspaniel  :)\r\nSorry for bothering you once again, but, could you verify if this is a bug or expected behavior?\r\n\r\n```js\r\nlet errors422 = { errors: { firstName: 'Name too long' } };\r\nmockUpdate('user').fails({ status: 422, response: errors422 });\r\nuser.save() // Fails as expected\r\n\r\nmockUpdate('user')\r\nuser.save() // Fails again but it was remocked to success :/\r\n```"},"comment":{"url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/comments/368711415","html_url":"https://github.com/danielspaniel/ember-data-factory-guy/issues/331#issuecomment-368711415","issue_url":"https://api.github.com/repos/danielspaniel/ember-data-factory-guy/issues/331","id":368711415,"user":{"login":"danielspaniel","id":180456,"avatar_url":"https://avatars1.githubusercontent.com/u/180456?v=4","gravatar_id":"","url":"https://api.github.com/users/danielspaniel","html_url":"https://github.com/danielspaniel","followers_url":"https://api.github.com/users/danielspaniel/followers","following_url":"https://api.github.com/users/danielspaniel/following{/other_user}","gists_url":"https://api.github.com/users/danielspaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/danielspaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielspaniel/subscriptions","organizations_url":"https://api.github.com/users/danielspaniel/orgs","repos_url":"https://api.github.com/users/danielspaniel/repos","events_url":"https://api.github.com/users/danielspaniel/events{/privacy}","received_events_url":"https://api.github.com/users/danielspaniel/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T01:15:57Z","updated_at":"2018-02-27T01:15:57Z","author_association":"OWNER","body":"Well, you make a good point too Maciej. \r\n\r\n  mockUpdate('user').fails() \r\n  mockUpdate('user') \r\n \r\n  kind of assumes now mockUpdate succeeds because last one wins. \r\n right now, I don't bother to check if there already is a PUT /users  being mocked, and \r\n just add the new one, which means the FIRST one always wins since the search is from first to last. \r\n  is that reasonable .. in this case no. should be last to first. \r\n  are there cases where that does NOT work though. \r\n  Think about it. \r\n  If you can make the case where the last mock should always win then I will change it so it works like you expect ( because I think others will expect same ) \r\n"}}
{"actor":{"display_login":"danielspaniel"}}