Esempio n. 1
0
 'should build correct tag with text, url, and options': function () {
   assert.equal(helpers.linkTo('My Account', '/account', { rel: 'me' }), '<a rel="me" href="/account">My Account</a>');
 },
Esempio n. 2
0
 'should escape test': function () {
   assert.equal(helpers.linkTo('/foo-bar/', 'Foo & Bar'), '<a href="/foo-bar/">Foo &amp; Bar</a>');
   assert.equal(helpers.linkTo('/foo-bar/', 'Foo < Bar'), '<a href="/foo-bar/">Foo &lt; Bar</a>');
   assert.equal(helpers.linkTo('/foo-bar/', 'Foo > Bar'), '<a href="/foo-bar/">Foo &gt; Bar</a>');
   assert.equal(helpers.linkTo('/foo-bar/', '"Foo Bar"'), '<a href="/foo-bar/">&quot;Foo Bar&quot;</a>');
 },
Esempio n. 3
0
 'should build correct tag with text and url': function () {
   assert.equal(helpers.linkTo('My Account', '/account'), '<a href="/account">My Account</a>');
 },
Esempio n. 4
0
 'should escape URLs with spaces': function () {
   assert.equal(helpers.linkTo('/foo bar/', 'Foo Bar'), '<a href="/foo%20bar/">Foo Bar</a>');
 },