unittests/tests/utils.js
branchpopcorn-port
changeset 297 ed4a459c9290
parent 285 b7aa28af2c10
child 308 495ef0f3e483
equal deleted inserted replaced
296:10ecc65d945c 297:ed4a459c9290
    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   
    40   
    41   test("test function to format a tweet", function() {
    41   test("test function to format a tweet", function() {
    42     var input = "@handle #hashtag ";
    42     var input = "@handle @bundle #hashtag http://t.co/11111";
    43     var output = "<a href='http://twitter.com/handle'>@handle</a> <a href='http://twitter.com/search?q=%23hashtag'>#hashtag</a> ";
    43     var output = "<a href='http://twitter.com/handle'>@handle</a> <a href='http://twitter.com/bundle'>@bundle</a> <a href='http://twitter.com/search?q=%23hashtag'>#hashtag</a> <a href='http://t.co/11111'>http://t.co/11111</a>";
    44     equal(IriSP.formatTweet(input), output, "the correct output is given");
    44     equal(IriSP.formatTweet(input), output, "the correct output is given");
    45   });
    45   });
    46 }
    46 }