(url, expectedToFindResults, expectedToFindChoice, expectedDraftContents, expectedDiskContents)
| 605 | } |
| 606 | |
| 607 | function editGet(url, expectedToFindResults, expectedToFindChoice, expectedDraftContents, expectedDiskContents) { |
| 608 | describe(`GET to edit url`, function() { |
| 609 | it('should load successfully', function(callback) { |
| 610 | locals.preStartTime = Date.now(); |
| 611 | request(url, function (error, response, body) { |
| 612 | if (error) { |
| 613 | return callback(error); |
| 614 | } |
| 615 | locals.postStartTime = Date.now(); |
| 616 | if (response.statusCode != 200) { |
| 617 | return callback(new Error('bad status: ' + response.statusCode)); |
| 618 | } |
| 619 | page = body; |
| 620 | callback(null); |
| 621 | }); |
| 622 | }); |
| 623 | it('should parse', function() { |
| 624 | locals.$ = cheerio.load(page); |
| 625 | }); |
| 626 | verifyEdit(expectedToFindResults, expectedToFindChoice, expectedDraftContents, expectedDiskContents); |
| 627 | }); |
| 628 | } |
| 629 | |
| 630 | function doEdits(data) { |
| 631 | describe(`edit ${data.path}`, function() { |
no test coverage detected