Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding untracked files.

  • Loading branch information...
commit 8f6908fe0313dd76b85615bcdb757f0d4bbd7d8a 1 parent 2609b8f
tomhuda authored
Showing with 47 additions and 0 deletions.
  1. +47 −0 packages/ember-data/tests/integration/rest_adapter_test.js
View
47 packages/ember-data/tests/integration/rest_adapter_test.js
@@ -0,0 +1,47 @@
+var store, adapter, Post, Comment;
+
+//module("REST Adapter", {
+ //setup: function() {
+ //adapter = DS.RESTAdapter.create();
+ //store = DS.Store.create({
+ //adapter: adapter
+ //});
+
+ //Post = DS.Model.extend();
+
+ //Comment = DS.Model.extend({
+ //body: DS.attr('string'),
+ //post: DS.belongsTo(Post)
+ //});
+
+ //Post.reopen({
+ //title: DS.attr('string'),
+ //comments: DS.hasMany(Comment)
+ //});
+ //},
+
+ //teardown: function() {
+ //adapter.destroy();
+ //store.destroy();
+ //}
+//});
+
+//test("a parent record in a changed relationship should not get committed to the server if nothing else has changed, but a child should", function() {
+ //expect(3);
+
+ //store.load(Post, { id: 1, title: "First Post" });
+ //store.load(Comment, { id: 2, body: "FIRST" });
+
+ //var post = store.find(Post, 1),
+ //comment = store.find(Comment, 2);
+
+ //post.get('comments').addObject(comment);
+
+ //adapter.ajax = function(url, type, hash) {
+ //equal(url, '/comments/2');
+ //equal(type, 'PUT');
+ //equal(hash, { body: "FIRST", post_id: 1 });
+ //};
+
+ //store.commit();
+//});
Please sign in to comment.
Something went wrong with that request. Please try again.