www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

openurlTest.js (552B)


      1 "use strict";
      2 
      3 describe("Zotero.OpenURL", function() {
      4 	describe("#createContextObject()", function () {
      5 		it("should use firstCreator for author", function* () {
      6 			var item = createUnsavedDataObject('item');
      7 			item.setCreators([
      8 				{
      9 					firstName: "Aaa",
     10 					lastName: "Editor",
     11 					creatorType: 'editor'
     12 				},
     13 				{
     14 					firstName: "Bbb",
     15 					lastName: "Author",
     16 					creatorType: 'author'
     17 				}
     18 			]);
     19 			var co = Zotero.OpenURL.createContextObject(item, "1.0");
     20 			assert.include(co, '&rft.aufirst=Bbb&rft.aulast=Author&');
     21 		});
     22 	});
     23 });