Fix tag diffing
This commit is contained in:
parent
3f4eebe51c
commit
f727b224e7
2 changed files with 43 additions and 1 deletions
|
@ -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);
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue