test: fix readerbookmark unit test

This commit is contained in:
Qingping Hou
2016-02-14 23:52:34 -08:00
parent f2019c9eac
commit 12c6bd7121
3 changed files with 5 additions and 4 deletions

View File

@@ -38,14 +38,14 @@ function ReaderStatus:addToMainMenu(tab_item_table)
end
function ReaderStatus:showStatus()
local statusWidget = StatusWidget:new {
local status_page = status_page:new {
thumbnail = self.document:getCoverPageImage(),
props = self.document:getProps(),
document = self.document,
settings = self.settings,
view = self.view,
}
UIManager:show(statusWidget)
UIManager:show(status_page)
end
function ReaderStatus:onPageUpdate(pageno)
@@ -66,4 +66,3 @@ function ReaderStatus:onReadSettings(config)
end
return ReaderStatus

2
kodev
View File

@@ -265,7 +265,7 @@ usage: test [front|base] <TEST_NAME>
if [ ! -z $2 ]; then
test_path="${test_path}/$2"
fi
busted --exclude-tags=notest ${test_path}
busted -o verbose_print --exclude-tags=notest ${test_path}
popd
}

View File

@@ -44,6 +44,7 @@ describe("ReaderBookmark module", function()
readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_epub),
}
readerui.status.enabled = false
end)
before_each(function()
UIManager:quit()
@@ -117,6 +118,7 @@ describe("ReaderBookmark module", function()
readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_pdf),
}
readerui.status.enabled = false
end)
before_each(function()
UIManager:quit()