mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-31 07:18:21 -04:00
Remove version from settings.
This commit is contained in:
parent
95f087cfd6
commit
17b5d4dfaa
7 changed files with 28 additions and 31 deletions
|
@ -18,8 +18,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
},
|
||||
setup: {
|
||||
PUBLIC_HREF: util.uniqId(),
|
||||
ROOT_HREF: util.uniqId(),
|
||||
VERSION: util.uniqId()
|
||||
ROOT_HREF: util.uniqId()
|
||||
}
|
||||
};
|
||||
this.applyFn = function () {
|
||||
|
@ -79,7 +78,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.strictEqual(instance.someOptions, this.xConfig.options.someOptions);
|
||||
assert.strictEqual(instance.otherOptions, this.xConfig.options.otherOptions);
|
||||
assert.strictEqual(instance.more, this.xConfig.options.more);
|
||||
assert.strictEqual(_.keys(instance).length, _.keys(this.xConfig.options).length + 3);
|
||||
assert.strictEqual(_.keys(instance).length, _.keys(this.xConfig.options).length + 2);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -100,15 +99,6 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.strictEqual(instance.rootHref, this.xConfig.setup.ROOT_HREF);
|
||||
});
|
||||
});
|
||||
|
||||
describe('.version', function () {
|
||||
|
||||
it('set correct', function () {
|
||||
|
||||
var instance = this.applyFn();
|
||||
assert.strictEqual(instance.version, this.xConfig.setup.VERSION);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}());
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'use strict';
|
||||
|
||||
var ID = 'main/info';
|
||||
var DEPS = ['$', 'config', 'core/server'];
|
||||
var DEPS = ['$', 'config', 'core/resource', 'core/server'];
|
||||
|
||||
describe('module \'' + ID + '\'', function () {
|
||||
|
||||
|
@ -16,6 +16,9 @@ describe('module \'' + ID + '\'', function () {
|
|||
},
|
||||
options: {}
|
||||
};
|
||||
this.xResource = {
|
||||
image: sinon.stub()
|
||||
};
|
||||
this.xServer = {
|
||||
request: sinon.stub()
|
||||
};
|
||||
|
@ -24,7 +27,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
|
||||
this.xServer.request.reset();
|
||||
|
||||
return this.definition.fn($, this.xConfig, this.xServer);
|
||||
return this.definition.fn($, this.xConfig, this.xResource, this.xServer);
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -80,6 +83,14 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isUndefined(instance);
|
||||
});
|
||||
|
||||
it('adds HTML #support to #content', function () {
|
||||
|
||||
this.applyFn();
|
||||
assert.lengthOf($('#content > #support'), 1);
|
||||
assert.lengthOf($('#support > .paypal'), 1);
|
||||
assert.lengthOf($('.paypal > form'), 1);
|
||||
});
|
||||
|
||||
it('adds HTML #login-wrapper to #content', function () {
|
||||
|
||||
this.applyFn();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'use strict';
|
||||
|
||||
var ID = 'view/topbar';
|
||||
var DEPS = ['$', 'core/settings', 'view/root'];
|
||||
var DEPS = ['$', 'view/root'];
|
||||
|
||||
describe('module \'' + ID + '\'', function () {
|
||||
|
||||
|
@ -10,11 +10,10 @@ describe('module \'' + ID + '\'', function () {
|
|||
|
||||
this.definition = modulejs._private.definitions[ID];
|
||||
|
||||
this.xSettings = {version: util.uniqId()};
|
||||
this.xRoot = {$el: null};
|
||||
this.applyFn = function () {
|
||||
|
||||
return this.definition.fn($, this.xSettings, this.xRoot);
|
||||
return this.definition.fn($, this.xRoot);
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -104,7 +103,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
it('#backlink has correct title', function () {
|
||||
|
||||
this.applyFn();
|
||||
assert.strictEqual($('#backlink').attr('title'), 'powered by h5ai ' + this.xSettings.version);
|
||||
assert.strictEqual($('#backlink').attr('title'), 'powered by h5ai - http://larsjung.de/h5ai/');
|
||||
});
|
||||
|
||||
it('#backlink has correct text', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue