diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/web/doc/module/25 | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/web/doc/module/25')
| -rw-r--r-- | addons/web/doc/module/25 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/addons/web/doc/module/25 b/addons/web/doc/module/25 new file mode 100644 index 00000000..1d63dc7f --- /dev/null +++ b/addons/web/doc/module/25 @@ -0,0 +1,55 @@ +Index: web_example/static/src/tests/timer.js +=================================================================== +--- web_example.orig/static/src/tests/timer.js ++++ web_example/static/src/tests/timer.js +@@ -1,8 +1,45 @@ + openerp.testing.section('timer', function (test) { +- test('successful test', function () { +- ok(true, "should work"); +- }); +- test('unsuccessful test', function () { +- ok(false, "shoud fail"); ++ test('format_time', function (instance) { ++ var w = new instance.web_example.Action(); ++ ++ strictEqual( ++ w.format_time(0), ++ '00:00:00'); ++ strictEqual( ++ w.format_time(543), ++ '00:00:00', ++ "should round sub-second times down to zero"); ++ strictEqual( ++ w.format_time(5340), ++ '00:00:05', ++ "should floor sub-second extents to the previous second"); ++ strictEqual( ++ w.format_time(60000), ++ '00:01:00'); ++ strictEqual( ++ w.format_time(3600000), ++ '01:00:00'); ++ strictEqual( ++ w.format_time(86400000), ++ '24:00:00'); ++ strictEqual( ++ w.format_time(604800000), ++ '168:00:00'); ++ ++ strictEqual( ++ w.format_time(22733958), ++ '06:18:53'); ++ strictEqual( ++ w.format_time(41676639), ++ '11:34:36'); ++ strictEqual( ++ w.format_time(57802094), ++ '16:03:22'); ++ strictEqual( ++ w.format_time(73451828), ++ '20:24:11'); ++ strictEqual( ++ w.format_time(84092336), ++ '23:21:32'); + }); + }); |
