Clean up JSLocate test
[bookreader.git] / BookReaderIA / test / unit / JSLocate.js
1 // Tests for BookReaderJSLocate.php
2
3 // $$$ TODO -- make the test host configurable/automagic
4
5 module("JSLocate");
6
7 testHost = 'http://www-testflip.archive.org';
8
9 // Set up dummy BookReader class for JSLocate
10 function BookReader() {
11 };
12
13 BookReader.prototype.init = function() {
14     return true;
15 };
16
17 asyncTest("JSLocate for notesonsubmarine00grea", function() {
18     expect(1);
19     $.getScript(testHost + '/bookreader/BookReaderJSLocate.php?id=amonographonmec00buregoog',
20         function(data, textStatus) {
21             equals(13, window.br.titleLeaf, 'br object should exist with title leaf 13. See https://bugs.launchpad.net/bookreader/+bug/517424');
22             start();
23         }
24     );
25 });
26