mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-27 01:35:40 -05:00
Add tests for title attribute preservation of time tags.
This commit is contained in:
parent
c613a8719d
commit
c8ca83c78d
1 changed files with 11 additions and 0 deletions
|
@ -73,6 +73,9 @@
|
|||
<p>Date only (default tooltip): <abbr id="defaultTooltip" class="timeago" title="2008-02-26"> </abbr>.</p>
|
||||
<p>Timestsamp (with millis): <abbr class="timeago" title="1978-12-18T17:17:00.021Z">(you shouldn't see this)</abbr>.</p>
|
||||
|
||||
<p><time id="testTimeTitle" class="timeago" datetime="2012-05-07T10:06:02+02:00" title="May 10, 2012 10:06">May 10, 2012</time></p>
|
||||
<p><time id="testTimeTitle2" class="timeago" datetime="2012-05-07T10:06:02+02:00">May 10, 2012</time></p>
|
||||
|
||||
<h2>Errors</h2>
|
||||
|
||||
<p>Bad (letters): <abbr class="bad timeago" title="bleh">(this should be displayed)</abbr>.</p>
|
||||
|
@ -302,6 +305,14 @@
|
|||
ok($("#defaultTooltip").attr("title") == "2008-02-26", "correctly set");
|
||||
});
|
||||
|
||||
test("should preserve title in time tags", function () {
|
||||
ok(($("#testTimeTitle").attr('title') === "May 10, 2012 10:06"), "title preserved")
|
||||
});
|
||||
|
||||
test("should set title in time tags without a title", function () {
|
||||
ok(($("#testTimeTitle2").attr('title') === "May 10, 2012"), "title set")
|
||||
});
|
||||
|
||||
module("Parsing");
|
||||
|
||||
// Note, different browsers behave slightly different
|
||||
|
|
Loading…
Reference in a new issue