Sha256: be652f04e2f6ed53f6e44b825090e248cb568a4e6541403ce6573303081e007a

Contents?: true

Size: 1019 Bytes

Versions: 16

Compression:

Stored size: 1019 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Apple Inc. and contributors.
// License:   Licened under MIT license (see license.js)
// ==========================================================================
/*globals module ok equals same test MyApp */
 
// test parsing of query string
module("SC.Query#copy");

test("basic copy", function() {
  var q=  SC.Query.create({
    conditions: "foo = bar",
    parameters: { foo: "bar" },
    orderBy: "foo",
    recordType: SC.Record,
    recordTypes: [SC.Record],
    location: SC.Query.REMOTE,
    scope: SC.CoreSet.create()
  }).freeze();
  
  var keys = 'conditions orderBy recordType recordTypes parameters location scope'.w();
  var copy = q.copy();
  
  equals(copy.isFrozen, NO, 'copy should not be frozen');
  keys.forEach(function(key) {
    equals(copy.get(key), q.get(key), 'copy.%@ should = original.%@'.fmt(key, key));
  }, this);
  
});

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sproutcore-1.0.1046 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1043 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1042 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1037 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1035 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1031 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1030 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1029 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1027 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1028 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1026 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1025 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1024 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1009 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1008 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.0.1003 frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js