Removes the angular constant jamstashVersion, goes back to using the json changelog as latest version
- Adds tests to checkVersion & checkVersionNewer: if the second version (older or required version) is undefined, it always returns true. This enables us to upgrade the settings even if there never was a Jamstash version stored in local storage.
This commit is contained in:
parent
812fff38cd
commit
fb65ae48bf
6 changed files with 91 additions and 62 deletions
|
@ -80,6 +80,12 @@ describe("utils service", function() {
|
|||
required = 'uSIwvRDp8QJO';
|
||||
expect(utils.checkVersion(running, required)).toBeTruthy();
|
||||
});
|
||||
|
||||
it("Given a version string '1.0.1' and undefined, when I check the version required, the result will be true", function() {
|
||||
running = '1.0.1';
|
||||
required = undefined;
|
||||
expect(utils.checkVersion(running, required)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe("checkVersionNewer() -", function() {
|
||||
|
@ -139,5 +145,11 @@ describe("utils service", function() {
|
|||
older = 'uSIwvRDp8QJO';
|
||||
expect(utils.checkVersionNewer(newer, older)).toBeFalsy();
|
||||
});
|
||||
|
||||
it("Given a version string '1.0.1' and undefined, when I check if the first version is newer, the result will be true", function() {
|
||||
newer = '1.0.1';
|
||||
older = undefined;
|
||||
expect(utils.checkVersionNewer(newer, older)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue