def test_prefix_link_when_not_needed(): "MarkmentRenderer#prefix_link_if_needed should NOT prefix if link is absolute" renderer = MarkmentRenderer() renderer.url_prefix = 'http://awesome.com' result = renderer.prefix_link_if_needed('http://ok.com/bar.png') result.should.equal('')
def test_prefix_link_when_needed(): "MarkmentRenderer#prefix_link_if_needed should prefix if link is relative" renderer = MarkmentRenderer() renderer.url_prefix = 'http://awesome.com' result = renderer.prefix_link_if_needed('bar.png') result.should.equal('http://awesome.com/bar.png')
def test_prefix_link_when_not_needed_provided(): "MarkmentRenderer#prefix_link_if_needed should NOT prefix if link is absolute" renderer = MarkmentRenderer() result = renderer.prefix_link_if_needed('bar.png') result.should.equal('')