Module:Book link/testcases

local p = require('Module:UnitTests') local BookLink = require('Module:Book link') local Creator = require('Module:Creator')

function p:test_edition local testCaseName = 'An edition' local params = { title = 'My Title', authors = { Creator.newCreator( 'Q37160' ) -- David Hume },		year = 1234 }	local expected = ' My Title by  David Hume  ( 1234 ) ' local link = BookLink.renderLink( params ) self:equals( testCaseName, tostring( link ), expected, { nowiki = true } ) end

return p