Skip to content

Instantly share code, notes, and snippets.

@archit
Created April 21, 2015 17:41
Show Gist options
  • Save archit/bbcde99b22641fb9a677 to your computer and use it in GitHub Desktop.
Save archit/bbcde99b22641fb9a677 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
import {
moduleForModel,
test
} from 'ember-qunit';
moduleForModel('experiment');
test("cloneAsNew: creates a new unsaved model", function(assert) {
var model = this.subject();
model.set("aProp", "1,2,3");
Ember.run(function() {
model.send("save");
});
assert.ok(!model.get("isNew"));
assert.ok(model.cloneAsNew().get("isNew"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment