Skip to content

Commit

Permalink
Added one more test for toSource
Browse files Browse the repository at this point in the history
  • Loading branch information
Branko Vukelic committed Sep 18, 2013
1 parent 82f522d commit b8caac6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/tests/test_tztime.coffee
Expand Up @@ -109,6 +109,13 @@ describe 'TzTime', () ->
d = TzTime 2013, 8, 1, 12, 44, 30, 300, -240
equal d.toSource(), '(new TzTime(1378053870300, -240))'

it 'should return a new instance with eval()', () ->
d = TzTime 2013, 8, 1, 12, 44, 30, 300, -240
s = d.toSource()
d1 = eval(s)
assert.ok d1.equals d
equal d1.timezone, -240

describe '#timezone', () ->
it 'is a number', () ->
d = TzTime 2013, 8, 1, 8, 20
Expand Down
10 changes: 9 additions & 1 deletion tests/test_tztime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8caac6

Please sign in to comment.