Skip to content

Commit

Permalink
test_issue_543 的测试中添加上时区
Browse files Browse the repository at this point in the history
  • Loading branch information
ywjno committed Feb 13, 2015
1 parent a8e8f06 commit 23c5680
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ before_script:
- cp ./tools/travis-ci/log4j.properties ./test/
notifications:
email: false
before_install:
- export TZ=Asia/Shanghai
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
machine:
timezone: Asia/Shanghai
java:
version: oraclejdk8

general:
branches:
only:
- master

dependencies:
override:
- cp ./tools/travis-ci/nutz-test.properties ./test/
- cp ./tools/travis-ci/log4j.properties ./test/

database:
override:
- psql -c 'create database nutztest;' -U ubuntu
4 changes: 3 additions & 1 deletion test/org/nutz/mvc/testapp/adaptor/SimpleAdaptorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.util.TimeZone;

import org.junit.Test;
import org.nutz.lang.Times;
import org.nutz.mvc.testapp.BaseWebappTest;
Expand All @@ -14,7 +16,7 @@ public void test_issue_543() {
get("/adaptor/github/issue/543?d=20120924");
assertEquals(200, resp.getStatus());

long ms = Times.ams("2012-09-24");
long ms = Times.ams("2012-09-24", TimeZone.getTimeZone("Asia/Shanghai"));
long rems = Long.parseLong(resp.getContent());
assertEquals(ms, rems);
}
Expand Down

0 comments on commit 23c5680

Please sign in to comment.