Skip to content

Commit

Permalink
Fix result strings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Dec 9, 2016
1 parent 53034a5 commit 70249a8
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions test/tests/utilitiesTest.js
Expand Up @@ -209,7 +209,7 @@ describe("Zotero.Utilities", function() {
assert.equal(cslJSONNote.type, 'article', 'note is exported as "article"');
assert.equal(cslJSONNote.title, note.getNoteTitle(), 'note title is set to Zotero pseudo-title');
}));
it("should convert standalone attachments to expected format", Zotero.Promise.coroutine(function* () {
it("[Juris-M] should convert standalone attachments to expected format", Zotero.Promise.coroutine(function* () {
let file = getTestDataDirectory();
file.append("empty.pdf");

Expand All @@ -224,7 +224,7 @@ describe("Zotero.Utilities", function() {
let cslJSONAttachment = Zotero.Utilities.itemToCSLJSON(attachment);
assert.equal(cslJSONAttachment.type, 'article', 'attachment is exported as "article"');
assert.equal(cslJSONAttachment.title, 'Empty', 'attachment title is correct');
assert.deepEqual(cslJSONAttachment.accessed, {"date-parts":[["2001",2,3]]}, 'attachment access date is mapped correctly');
assert.deepEqual(cslJSONAttachment.accessed, { raw: '2001-02-03T12:13:14Z' }, 'attachment access date is mapped correctly');
}));
it("should refuse to convert unexpected item types", Zotero.Promise.coroutine(function* () {
let data = yield populateDBWithSampleData(loadSampleData('journalArticle'));
Expand All @@ -245,7 +245,10 @@ describe("Zotero.Utilities", function() {
creatorType: 'author',
expect: {
given: 'John',
family: 'Smith'
family: 'Smith',
multi: {
_key: {}
}
}
},
{
Expand All @@ -257,7 +260,10 @@ describe("Zotero.Utilities", function() {
given: 'Jean',
"dropping-particle": 'de',
"non-dropping-particle": 'la',
family: 'Fontaine'
family: 'Fontaine',
multi: {
_key: {}
}
}
},
{
Expand All @@ -268,7 +274,10 @@ describe("Zotero.Utilities", function() {
expect: {
given: 'Vincent',
"non-dropping-particle": 'van',
family: 'Gogh'
family: 'Gogh',
multi: {
_key: {}
}
}
},
{
Expand All @@ -279,7 +288,10 @@ describe("Zotero.Utilities", function() {
expect: {
given: 'Alexander',
"dropping-particle": 'von',
family: 'Humboldt'
family: 'Humboldt',
multi: {
_key: {}
}
}
},
{
Expand All @@ -288,7 +300,10 @@ describe("Zotero.Utilities", function() {
creatorType: 'author',
fieldMode: 1,
expect: {
literal: 'Jean de la Fontaine'
literal: 'Jean de la Fontaine',
multi: {
_key: {}
}
}
},
{
Expand All @@ -298,7 +313,10 @@ describe("Zotero.Utilities", function() {
creatorType: 'author',
expect: {
given: 'Jean de',
family: 'la Fontaine'
family: 'la Fontaine',
multi: {
_key: {}
}
}
}
];
Expand Down

0 comments on commit 70249a8

Please sign in to comment.