Sha256: 5e1f3b5ad885be64787c9fe80934ad4a162bdd8a482b6c9ba4e4733285191950

Contents?: true

Size: 1020 Bytes

Versions: 18

Compression:

Stored size: 1020 Bytes

Contents

// ==========================================================================
// 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 */
 
// 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

18 entries across 18 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.5 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.5-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.4-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.4 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.3.1 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.3-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.3 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.2-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.2 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.1-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.1 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.0-java lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js
sproutcore-1.4.0 lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js