Comparing version 0.13.0 to 0.13.1
@@ -31,2 +31,3 @@ var async = require('async'); | ||
var node = txn.save(obj); | ||
if (obj[this.options.id] != null) node = txn.read(obj); | ||
txn.label(node, label); | ||
@@ -33,0 +34,0 @@ return this._safeBatchCommit(txn, function(err, result) { |
@@ -11,3 +11,3 @@ { | ||
"description": "A thin and familiar layer between node and neo4j's REST api.", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"repository": { | ||
@@ -14,0 +14,0 @@ "url": "https://github.com/brikteknologier/seraph" |
@@ -35,2 +35,21 @@ var db = require('./util/database').db(); | ||
}); | ||
it('should update with a label', function(done) { | ||
var label = uniqn(); | ||
var label2 = uniqn(); | ||
db.save({name: 'Jon'}, label, function(err, node) { | ||
assert(!err); | ||
assert.equal(node.name, 'Jon'); | ||
db.save({name: 'Jon', location: 'Landås'}, label2, function(err, node) { | ||
assert(!err); | ||
assert(node.location == 'Landås'); | ||
db.readLabels(node, function(err, labels) { | ||
assert(!err); | ||
assert(labels.indexOf(label) == -1); | ||
assert(labels.indexOf(label2) != -1); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -37,0 +56,0 @@ it('should save multiple nodes with a label', function(done) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186206
4013