Skip to content

Commit

Permalink
Fix Merge tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Apr 24, 2017
1 parent 8f79a44 commit 13d0c3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Merge {
if (doc.size == null) { doc.size = file.size }
if (doc.class == null) { doc.class = file.class }
if (doc.mime == null) { doc.mime = file.mime }
} else if (!isUpToDate(side, doc)) {
} else if (!isUpToDate(side, file)) {
return this.resolveConflictAsync(side, doc)
}
if (sameFile(file, doc)) {
Expand Down
6 changes: 5 additions & 1 deletion test/unit/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ describe('Merge', function () {
path: 'FIZZBUZZ.JPG',
docType: 'file',
md5sum: '3333333333333333333333333333333333333333',
tags: ['qux', 'quux']
tags: ['qux', 'quux'],
sides: {
local: 2,
remote: 2
}
}
this.merge.updateFileAsync(this.side, clone(doc)).then(() => {
this.pouch.db.get(this.file._id, function (err, res) {
Expand Down

0 comments on commit 13d0c3d

Please sign in to comment.