Skip to content

Commit

Permalink
fix unit tests by requesting older dom version
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Jun 1, 2018
1 parent 32a7d2b commit a622ecb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/unit/readerbookmark_spec.lua
Expand Up @@ -47,6 +47,12 @@ describe("ReaderBookmark module", function()
local readerui
setup(function()
DocSettings:open(sample_epub):purge()

-- try it with older dom version
local cfg = DocSettings:open(sample_epub)
cfg:saveSetting("cre_dom_version", 20180524)
cfg:flush()

readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_epub),
}
Expand Down
5 changes: 5 additions & 0 deletions spec/unit/readerfooter_spec.lua
Expand Up @@ -137,6 +137,11 @@ describe("Readerfooter module", function()
purgeDir(DocSettings:getSidecarDir(sample_epub))
os.remove(DocSettings:getHistoryPath(sample_epub))

-- try it with older dom version
local cfg = DocSettings:open(sample_epub)
cfg:saveSetting("cre_dom_version", 20180524)
cfg:flush()

local readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_epub),
}
Expand Down

0 comments on commit a622ecb

Please sign in to comment.