Duplicate images (#2058)

* [Images] changed updateHistory to only compare the URL value and timestamp for equality
This commit is contained in:
David Milewicz
2018-06-20 14:26:13 -07:00
committed by Andrew Henry
parent 374e4afc32
commit a3e78bbf91
2 changed files with 24 additions and 3 deletions

View File

@@ -230,10 +230,14 @@ define(
});
it ("doesnt append duplicate datum", function () {
var mockDatum = {url: 'image/url', utc: 1434600000000};
var mockDatum = {value: 'image/url', timestamp: 1434700000000};
var mockDatum2 = {value: 'image/url', timestamp: 1434700000000};
var mockDatum3 = {value: 'image/url', url: 'someval', timestamp: 1434700000000};
expect(controller.updateHistory(mockDatum)).toBe(true);
expect(controller.updateHistory(mockDatum)).toBe(false);
expect(controller.updateHistory(mockDatum)).toBe(false);
expect(controller.updateHistory(mockDatum2)).toBe(false);
expect(controller.updateHistory(mockDatum3)).toBe(false);
});
describe("when user clicks on imagery thumbnail", function () {