diff options
Diffstat (limited to 'toolkit/components/places/tests/unit/test_visitsInDB.js')
-rw-r--r-- | toolkit/components/places/tests/unit/test_visitsInDB.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/toolkit/components/places/tests/unit/test_visitsInDB.js b/toolkit/components/places/tests/unit/test_visitsInDB.js new file mode 100644 index 0000000000..3cab39ed98 --- /dev/null +++ b/toolkit/components/places/tests/unit/test_visitsInDB.js @@ -0,0 +1,12 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et: */ + +add_task(function* test_execute() { + const TEST_URI = uri("http://mozilla.com"); + + do_check_eq(0, yield PlacesTestUtils.visitsInDB(TEST_URI)); + yield PlacesTestUtils.addVisits({uri: TEST_URI}); + do_check_eq(1, yield PlacesTestUtils.visitsInDB(TEST_URI)); + yield PlacesTestUtils.addVisits({uri: TEST_URI}); + do_check_eq(2, yield PlacesTestUtils.visitsInDB(TEST_URI)); +}); |