All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.xp.examples.node.push-1.js Maven / Gradle / Ivy

The newest version!
var nodeLib = require('/lib/xp/node');
var assert = require('/lib/xp/testing');

var repo = nodeLib.connect({
    repoId: 'com.enonic.cms.default',
    branch: 'master'
});

// BEGIN
// Push nodes from current branch
var result = repo.push({
    keys: ['a'],
    target: 'otherBranch',
    resolve: false
});
// END

// BEGIN
// Node created.
var expected = {
    'success': [
        'a'
    ],
    'failed': [],
    'deleted': []
};
// END

assert.assertJsonEquals(expected, result);






© 2015 - 2024 Weber Informatics LLC | Privacy Policy