Add a test to make sure HTTPS URLs aren't failing for Quick Copy

This commit is contained in:
Dan Stillman 2015-07-03 22:14:08 -04:00
parent 242581a270
commit 899e33c993

View File

@ -5,10 +5,14 @@ describe("Zotero.QuickCopy", function() {
// TODO: These should set site-specific prefs and test the actual response against it,
// but that will need to wait for 5.0. For now, just make sure they don't fail.
describe("#getFormatFromURL()", function () {
it("should handle a domain", function () {
it("should handle an HTTP URL", function () {
assert.deepEqual(Zotero.QuickCopy.getFormatFromURL('http://foo.com/'), quickCopyPref);
})
it("should handle an HTTPS URL", function () {
assert.deepEqual(Zotero.QuickCopy.getFormatFromURL('https://foo.com/'), quickCopyPref);
})
it("should handle a domain and path", function () {
assert.deepEqual(Zotero.QuickCopy.getFormatFromURL('http://foo.com/bar'), quickCopyPref);
})