emberjs/data — pull request #924 by bobbus (2013-04-26 12:47:41+00:00)
Title: A new invalid record should be clean when we delete it

As of now, when we delete a newly created record which is invalid (after receiving a 422 response from the server) the record would stay dirty.
This PR is fixing this behavior.

I added a test which is working **but I'm pretty sure I messed something up as the tests suite will failed one time over two since this test**, probably missing a teardown or something.
If anyone can help me to fix this problem in test ? Please read my comment in diff for more explanation.

I can also extract the `deleteRecord` function as it is duplicate in the lines above.. Should I ?