mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-01 15:58:19 -04:00
Replace appHref with publicHref.
This commit is contained in:
parent
05547c2685
commit
4db158e8d9
7 changed files with 9 additions and 29 deletions
|
@ -16,7 +16,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
b: 'myTheme/b.jpg'
|
||||
}
|
||||
};
|
||||
this.xSettings = {appHref: util.uniqPath('/appHref/')};
|
||||
this.xSettings = {publicHref: util.uniqPath('/publicHref/')};
|
||||
this.applyFn = function () {
|
||||
|
||||
return this.definition.fn(_, this.xConfig, this.xSettings);
|
||||
|
@ -77,7 +77,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
it('works', function () {
|
||||
|
||||
var instance = this.applyFn();
|
||||
var ui = this.xSettings.appHref + 'public/images/ui/';
|
||||
var ui = this.xSettings.publicHref + 'images/ui/';
|
||||
|
||||
assert.strictEqual(instance.image(), ui + 'undefined.svg');
|
||||
assert.strictEqual(instance.image(1), ui + '1.svg');
|
||||
|
@ -97,7 +97,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
it('works', function () {
|
||||
|
||||
var instance = this.applyFn();
|
||||
var themes = this.xSettings.appHref + 'public/images/themes/';
|
||||
var themes = this.xSettings.publicHref + 'images/themes/';
|
||||
|
||||
assert.strictEqual(instance.icon(''), themes + 'default/file.svg');
|
||||
assert.strictEqual(instance.icon('a'), themes + 'myTheme/a.svg');
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
more: util.uniqObj()
|
||||
},
|
||||
setup: {
|
||||
APP_HREF: util.uniqId(),
|
||||
PUBLIC_HREF: util.uniqId(),
|
||||
ROOT_HREF: util.uniqId(),
|
||||
VERSION: util.uniqId()
|
||||
}
|
||||
|
@ -83,12 +83,12 @@ describe('module \'' + ID + '\'', function () {
|
|||
});
|
||||
});
|
||||
|
||||
describe('.appHref', function () {
|
||||
describe('.publicHref', function () {
|
||||
|
||||
it('set correct', function () {
|
||||
|
||||
var instance = this.applyFn();
|
||||
assert.strictEqual(instance.appHref, this.xConfig.setup.APP_HREF);
|
||||
assert.strictEqual(instance.publicHref, this.xConfig.setup.PUBLIC_HREF);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -183,11 +183,6 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isTrue(this.item.isRoot());
|
||||
});
|
||||
|
||||
it('.isH5ai() returns false', function () {
|
||||
|
||||
assert.isFalse(this.item.isH5ai());
|
||||
});
|
||||
|
||||
it('.isEmpty() returns true', function () {
|
||||
|
||||
assert.isTrue(this.item.isEmpty());
|
||||
|
@ -283,11 +278,6 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isFalse(this.item.isRoot());
|
||||
});
|
||||
|
||||
it('.isH5ai() returns false', function () {
|
||||
|
||||
assert.isFalse(this.item.isH5ai());
|
||||
});
|
||||
|
||||
it('.isEmpty() returns true', function () {
|
||||
|
||||
assert.isTrue(this.item.isEmpty());
|
||||
|
@ -383,11 +373,6 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isFalse(this.item.isRoot());
|
||||
});
|
||||
|
||||
it('.isH5ai() returns false', function () {
|
||||
|
||||
assert.isFalse(this.item.isH5ai());
|
||||
});
|
||||
|
||||
it('.isEmpty() returns true', function () {
|
||||
|
||||
assert.isTrue(this.item.isEmpty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue