Update tests.

This commit is contained in:
Lars Jung 2015-06-14 15:24:05 +02:00
parent 18a62ca831
commit 787eae7a80
22 changed files with 113 additions and 161 deletions

View file

@ -10,7 +10,7 @@ describe('module \'' + ID + '\'', function () {
this.definition = modulejs._private.definitions[ID];
this.xConfig = {langs: util.uniqObj()};
this.xConfig = {langs: uniq.obj()};
this.applyFn = function () {
return this.definition.fn(_, this.xConfig);

View file

@ -242,7 +242,7 @@ describe('module \'' + ID + '\'', function () {
var $el = $('<a/>');
var item = {
absHref: util.uniqId(),
absHref: uniq.id(),
isManaged: false,
isFolder: sinon.stub().returns(false)
};
@ -259,7 +259,7 @@ describe('module \'' + ID + '\'', function () {
var $el = $('<a/>');
var item = {
absHref: util.uniqId(),
absHref: uniq.id(),
isManaged: false,
isFolder: sinon.stub().returns(true)
};
@ -276,7 +276,7 @@ describe('module \'' + ID + '\'', function () {
var $el = $('<a/>');
var item = {
absHref: util.uniqId(),
absHref: uniq.id(),
isManaged: true,
isFolder: sinon.stub().returns(true)
};
@ -293,7 +293,7 @@ describe('module \'' + ID + '\'', function () {
var $el = $('<a/>');
var item = {
absHref: util.uniqId(),
absHref: uniq.id(),
isManaged: true,
isFolder: sinon.stub().returns(true)
};

View file

@ -16,7 +16,7 @@ describe('module \'' + ID + '\'', function () {
b: 'myTheme/b.jpg'
}
};
this.xSettings = {publicHref: util.uniqPath('/publicHref/')};
this.xSettings = {publicHref: uniq.path('/publicHref/')};
this.applyFn = function () {
return this.definition.fn(_, this.xConfig, this.xSettings);
@ -62,7 +62,7 @@ describe('module \'' + ID + '\'', function () {
var instance = this.applyFn();
assert.isPlainObject(instance);
assert.lengthOf(_.keys(instance), 2);
assert.lengthOfKeys(instance, 2);
});
});

View file

@ -81,7 +81,7 @@ describe('module \'' + ID + '\'', function () {
var instance = this.applyFn();
assert.isPlainObject(instance);
assert.lengthOf(_.keys(instance), 2);
assert.lengthOfKeys(instance, 2);
});
});
@ -97,8 +97,8 @@ describe('module \'' + ID + '\'', function () {
var instance = this.applyFn();
var xData = util.uniqObj();
var xResult = util.uniqObj();
var xData = uniq.obj();
var xResult = uniq.obj();
var spy = sinon.spy();
var res = instance.request(xData, spy);
@ -124,7 +124,7 @@ describe('module \'' + ID + '\'', function () {
var instance = this.applyFn();
var xData = util.uniqObj();
var xData = uniq.obj();
var spy = sinon.spy();
var res = instance.request(xData, spy);
@ -160,8 +160,8 @@ describe('module \'' + ID + '\'', function () {
var instance = this.applyFn();
var xData = {
a: util.uniqId(),
b: util.uniqId()
a: uniq.id(),
b: uniq.id()
};
var res = instance.formRequest(xData);

View file

@ -12,13 +12,13 @@ describe('module \'' + ID + '\'', function () {
this.xConfig = {
options: {
someOptions: util.uniqObj(),
otherOptions: util.uniqObj(),
more: util.uniqObj()
someOptions: uniq.obj(),
otherOptions: uniq.obj(),
more: uniq.obj()
},
setup: {
PUBLIC_HREF: util.uniqId(),
ROOT_HREF: util.uniqId()
PUBLIC_HREF: uniq.id(),
ROOT_HREF: uniq.id()
}
};
this.applyFn = function () {