Merge branch 'master' into jsrefactor and fixing baseUri unit test

This commit is contained in:
El RIDO 2017-03-05 12:11:55 +01:00
commit fb99d5bb93
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
13 changed files with 195 additions and 51 deletions

View file

@ -67,6 +67,10 @@ describe('Helper', function () {
});
describe('baseUri', function () {
before(function () {
$.PrivateBin.Helper.reset();
});
jsc.property(
'returns the URL without query & fragment',
jsc.nearray(jsc.elements(a2zString)),
@ -77,6 +81,7 @@ describe('Helper', function () {
var expected = schema.join('') + '://' + address.join('') + '/',
clean = jsdom('', {url: expected + '?' + query.join('') + '#' + fragment}),
result = $.PrivateBin.Helper.baseUri();
$.PrivateBin.Helper.reset();
clean();
return expected === result;
}
@ -101,6 +106,10 @@ describe('Helper', function () {
describe('Model', function () {
describe('getPasteId', function () {
before(function () {
$.PrivateBin.Model.reset();
});
jsc.property(
'returns the query string without separator, if any',
jsc.nearray(jsc.elements(a2zString)),