From 5aefb41631dd1782aeb9dda438abec88d1338d43 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sat, 26 Dec 2015 14:20:51 -0800 Subject: [PATCH] fix readerfooter spec --- spec/unit/readerfooter_spec.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/unit/readerfooter_spec.lua b/spec/unit/readerfooter_spec.lua index d9b9416ea..24e0ecaf0 100644 --- a/spec/unit/readerfooter_spec.lua +++ b/spec/unit/readerfooter_spec.lua @@ -9,10 +9,11 @@ describe("Readerfooter module", function() local readerui = ReaderUI:new{ document = DocumentRegistry:openDocument(sample_epub), } + readerui.view.footer.settings.page_progress = true readerui.view.footer.settings.all_at_once = true readerui.view.footer:updateFooterPage() timeinfo = readerui.view.footer:getTimeInfo() - assert.are.same('B:0% | '..timeinfo..' | => 0 | R:100% | TB: 00:00 | TC: 00:00', + assert.are.same('B:0% | '..timeinfo..' | 1 / 1 | => 0 | R:100% | TB: 00:00 | TC: 00:00', readerui.view.footer.progress_text.text) end) @@ -21,10 +22,11 @@ describe("Readerfooter module", function() local readerui = ReaderUI:new{ document = DocumentRegistry:openDocument(sample_pdf), } + readerui.view.footer.settings.page_progress = true readerui.view.footer.settings.all_at_once = true readerui.view.footer:updateFooterPage() timeinfo = readerui.view.footer:getTimeInfo() - assert.are.same('B:0% | '..timeinfo..' | => 1 | R:50% | TB: na | TC: na', + assert.are.same('B:0% | '..timeinfo..' | 1 / 2 | => 1 | R:50% | TB: na | TC: na', readerui.view.footer.progress_text.text) end) end)