From 633a28da60375bfbfaaf236bb75ebff7ef5c5e2c Mon Sep 17 00:00:00 2001 From: Satoshi KOJIMA Date: Tue, 6 Nov 2018 10:13:25 +0900 Subject: [PATCH] [skip ci] fix landmark test --- spec/example_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/example_spec.rb b/spec/example_spec.rb index c61c728..8110338 100644 --- a/spec/example_spec.rb +++ b/spec/example_spec.rb @@ -179,11 +179,14 @@ expect(tocs[1].content.strip).to eq 'Chapter 2' # check landmarks - landmarks = xml.at_xpath("//xmlns:nav[@epub:type='landmarks']").xpath("//xmlns:ol/smlns:li") + landmarks = xml.at_xpath("//xmlns:nav[@epub:type='landmarks']").xpath("//xmlns:ol/xmlns:li/xmlns:a") expect(landmarks.size).to eq 3 expect(landmarks[0]['@epub:type']).to eq 'cover' + expect(landmarks[0]['href']).to eq 'cover.xhtml' expect(landmarks[1]['@epub:type']).to eq 'toc' + expect(landmarks[1]['href']).to eq '#toc' expect(landmarks[2]['@epub:type']).to eq 'bodymatter' + expect(landmarks[2]['href']).to eq 'chapt.xhtml' book.generate_epub(epubname) epubcheck(epubname) end