Fix tag diffing

This commit is contained in:
Dan Stillman 2015-05-14 19:11:09 -04:00
parent 3f4eebe51c
commit f727b224e7
2 changed files with 43 additions and 1 deletions

View file

@ -66,5 +66,45 @@ describe("Zotero.DataObjects", function() {
var diff = Zotero.Items.diff(json1, json2);
assert.isFalse(diff);
})
it("should show tags of different types as different", function* () {
var json1 = {
tags: [
{
tag: "Foo"
}
]
};
var json2 = {
tags: [
{
tag: "Foo",
type: 1
}
]
};
var diff = Zotero.Items.diff(json1, json2);
assert.isFalse(diff);
})
it("should not show manual tags as different without 'type' property", function* () {
var json1 = {
tags: [
{
tag: "Foo"
}
]
};
var json2 = {
tags: [
{
tag: "Foo",
type: 0
}
]
};
var diff = Zotero.Items.diff(json1, json2);
assert.isFalse(diff);
})
})
})