Esempio n. 1
0
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('')
Esempio n. 2
0
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')
Esempio n. 3
0
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('')