Permalink
Browse files

adding busy dirty unit tests

  • Loading branch information...
1 parent d93b1d3 commit d80b4fb2d129b92650b9564899e0a561283f4039 @onkis onkis committed Apr 10, 2012
Showing with 38 additions and 0 deletions.
  1. +38 −0 frameworks/datastore/tests/system/store/busyDirty.js
@@ -0,0 +1,38 @@
+// ==========================================================================
+// Project: SproutCore - JavaScript Application Framework
+// Copyright: ©2006-2010 Apple Inc. and contributors.
+// License: Licensed under MIT license (see license.js)
+// ==========================================================================
+/*globals module ok equals same test MyApp */
+
+var store, storeKey8, json8;
+
+module("SC.Store#BUSY_DIRTY", {
+ setup: function() {
+
+ store = SC.Store.create();
+
+ json8 = {
+ guid: "commitGUID8",
+ string: "asdf",
+ number: 123,
+ bool: NO
+ };
+
+ SC.RunLoop.begin();
+ storeKey8 = SC.Store.generateStoreKey();
+ store.writeDataHash(storeKey8, json8, SC.Record.BUSY_DIRTY);
+ SC.RunLoop.end();
+ }
+});
+
+test("Confirm that busy dirty works", function() {
+ var status;
+ store.dataSourceDidComplete(storeKey8);
+ status = store.readStatus(storeKey8);
+ equals(status, SC.Record.READY_DIRTY, "should be READY_DIRTY");
+
+});
+
+
+

0 comments on commit d80b4fb

Please sign in to comment.