♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
7a09f7c834
commit
86b1f0c562
11 files changed
+26
-26
No files matched your search
@@ -37,7 +37,7 @@ package.loaded["http.request"] = {
|
||||
}
|
||||
local Chapter = require("moonsource_zymk.chapter")
|
||||
local called = false
|
||||
local identity = { source_id = "ext.zymk", stable_id = "book" }
|
||||
local identity = { source_id = "zymk", stable_id = "book" }
|
||||
local handle = Chapter.materializeAsync(identity, { uid = "123/first" }, nil, function() called = true end)
|
||||
handle.cancel()
|
||||
Assert.is_true(cancelled.download)
|
||||
|
||||
@@ -50,7 +50,7 @@ Assert.is_nil(Page.detail("<html></html>"))
|
||||
local detail = Mapper.detail(parsed, 4982)
|
||||
Assert.eq(detail.authors, "飒飒动漫")
|
||||
Assert.eq(detail.cover, "https://img/cover.jpg")
|
||||
Assert.eq(detail.source_id, "ext.zymk")
|
||||
Assert.eq(detail.source_id, "zymk")
|
||||
Assert.eq(detail.intro, "简介")
|
||||
|
||||
local toc = Mapper.chapters(25289, {
|
||||
|
||||
@@ -46,7 +46,7 @@ Assert.is_false(Login.hasAccount())
|
||||
Assert.is_nil(Mapper.account({ openid = "guest", type = "device" }))
|
||||
session:sendSmsAsync(phone, nil, false, done)
|
||||
Assert.matches(requests[#requests].url, "/apinew/sendsms/$")
|
||||
Assert.matches(requests[#requests].body, "service=ext.zymk")
|
||||
Assert.matches(requests[#requests].body, "service=zymk")
|
||||
Assert.matches(requests[#requests].body, "refresh=0")
|
||||
local captcha = { Image = "image", Width = 320, Height = 120, Content = "文字" }
|
||||
requests[#requests].cb(JSON.encode({ status = 1031, data = captcha }))
|
||||
|
||||
@@ -36,7 +36,7 @@ source.loadTocAsync = function(_self, _identity, cb)
|
||||
cb(toc)
|
||||
return { cancel = function() cancelled.toc = true end }
|
||||
end
|
||||
local identity = { source_id = "ext.zymk", stable_id = "book" }
|
||||
local identity = { source_id = "zymk", stable_id = "book" }
|
||||
local called = false
|
||||
local handle = source:openBookAsync(identity, nil, function() called = true end)
|
||||
Stubs.flush()
|
||||
|
||||
@@ -26,7 +26,7 @@ end }
|
||||
local written, options, calls = nil, nil, 0
|
||||
package.loaded["book.books_db"] = {
|
||||
reconcile = function(source_id, books, opts)
|
||||
Assert.eq(source_id, "ext.zymk")
|
||||
Assert.eq(source_id, "zymk")
|
||||
written, options, calls = books, opts, calls + 1
|
||||
return true, 0
|
||||
end,
|
||||
|
||||
Reference in new issue
Block a user