unittests/tests/utils.js
branchtweet-widget
changeset 285 b7aa28af2c10
parent 256 8e1181b855bd
child 297 ed4a459c9290
equal deleted inserted replaced
284:cbb17aa3361c 285:b7aa28af2c10
    35               "the converted time is correct");
    35               "the converted time is correct");
    36     
    36     
    37     t = -t;
    37     t = -t;
    38     deepEqual(IriSP.secondsToTime(t),  {"hours" : h, "minutes" : m, "seconds" : s}, "the function is immune to negative numbers.");
    38     deepEqual(IriSP.secondsToTime(t),  {"hours" : h, "minutes" : m, "seconds" : s}, "the function is immune to negative numbers.");
    39   });
    39   });
       
    40   
       
    41   test("test function to format a tweet", function() {
       
    42     var input = "@handle #hashtag ";
       
    43     var output = "<a href='http://twitter.com/handle'>@handle</a> <a href='http://twitter.com/search?q=%23hashtag'>#hashtag</a> ";
       
    44     equal(IriSP.formatTweet(input), output, "the correct output is given");
       
    45   });
    40 }
    46 }