diff options
author | franck cuny <franck@lumberjaph.net> | 2010-09-23 22:09:36 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-09-23 22:09:36 +0200 |
commit | 585ce5b679406ffe8644b23e3a267d7af8e3a5de (patch) | |
tree | 27dff9a966b9c265e929330b48314f1c38d48428 /t | |
parent | ignore logs (diff) | |
download | jitterbug-585ce5b679406ffe8644b23e3a267d7af8e3a5de.tar.gz |
initial import
Diffstat (limited to '')
-rw-r--r-- | t/001_base.t | 5 | ||||
-rw-r--r-- | t/002_index_route.t | 11 | ||||
-rw-r--r-- | t/data/hook.json | 44 | ||||
-rw-r--r-- | t/data/test.yaml | 42 |
4 files changed, 102 insertions, 0 deletions
diff --git a/t/001_base.t b/t/001_base.t new file mode 100644 index 0000000..936ffff --- /dev/null +++ b/t/001_base.t @@ -0,0 +1,5 @@ +use Test::More tests => 1; +use strict; +use warnings; + +use_ok 'jitterbug'; diff --git a/t/002_index_route.t b/t/002_index_route.t new file mode 100644 index 0000000..4cab1ed --- /dev/null +++ b/t/002_index_route.t @@ -0,0 +1,11 @@ +use Test::More tests => 3; +use strict; +use warnings; + +# the order is important +use jitterbug; +use Dancer::Test; + +route_exists [GET => '/'], 'a route handler is defined for /'; +response_status_is ['GET' => '/'], 200, 'response status is 200 for /'; +response_content_like [GET => '/'], qr/Projects/, 'content looks OK for /'; diff --git a/t/data/hook.json b/t/data/hook.json new file mode 100644 index 0000000..2e55cb7 --- /dev/null +++ b/t/data/hook.json @@ -0,0 +1,44 @@ +{ + "payload" : { + "after" : "de8251ff97ee194a289832576287d6f8ad74e3d0", + "repository" : { + "owner" : { + "email" : "chris@ozmm.org", + "name" : "defunkt" + }, + "forks" : 2, + "watchers" : 5, + "private" : 1, + "name" : "github", + "url" : "http://github.com/sukria/Dancer", + "description" : "Youre lookin at it." + }, + "commits" : [ + { + "timestamp" : "2008-02-15T14:57:17-08:00", + "added" : [ + "filepath.rb" + ], + "url" : "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59", + "author" : { + "email" : "chris@ozmm.org", + "name" : "Chris Wanstrath" + }, + "id" : "41a212ee83ca127e3c8cf465891ab7216a705f59", + "message" : "okay i give in" + }, + { + "timestamp" : "2008-02-15T14:36:34-08:00", + "url" : "http://github.com/sukria/Dancer/commit/8c3c1d6be0fa27ada4f03258ddea7683c967a925", + "author" : { + "email" : "chris@ozmm.org", + "name" : "Chris Wanstrath" + }, + "id" : "8c3c1d6be0fa27ada4f03258ddea7683c967a925", + "message" : "update pricing a tad" + } + ], + "ref" : "refs/heads/master", + "before" : "5aef35982fb2d34e9d9d4502f6ede1072793222d" + } +} \ No newline at end of file diff --git a/t/data/test.yaml b/t/data/test.yaml new file mode 100644 index 0000000..9636611 --- /dev/null +++ b/t/data/test.yaml @@ -0,0 +1,42 @@ +--- +after: 22116bcdb229c1514f3069aaaf9c87e9d5455409 +before: db8d02317fce7fa2d8f5b75273302eee7b266b87 +commits: + - + added: [] + + author: + email: franck@lumberjaph.net + name: franck cuny + id: 8c3c1d6be0fa27ada4f03258ddea7683c967a925 + message: test + modified: + - lib/Dancer.pm + removed: [] + + timestamp: 2010-09-23T08:04:42-07:00 + url: https://github.com/franckcuny/Dancer/commit/22116bcdb229c1514f3069aaaf9c87e9d5455409 +compare: https://github.com/franckcuny/Dancer/compare/db8d023...22116bc +forced: !!perl/scalar:JSON::XS::Boolean 0 +pusher: + email: franck@lumberjaph.net + name: franckcuny +ref: refs/heads/test +repository: + created_at: 2010/01/14 12:58:56 -0800 + description: Minimal-effort oriented web application framework for Perl (port of Ruby's Sinatra) + fork: !!perl/scalar:JSON::XS::Boolean 1 + forks: 0 + has_downloads: !!perl/scalar:JSON::XS::Boolean 1 + has_issues: !!perl/scalar:JSON::XS::Boolean 0 + has_wiki: !!perl/scalar:JSON::XS::Boolean 1 + homepage: '' + name: Dancer + open_issues: 0 + owner: + email: franck@lumberjaph.net + name: franckcuny + private: !!perl/scalar:JSON::XS::Boolean 1 + pushed_at: 2010/09/23 08:04:49 -0700 + url: https://github.com/sukria/Dancer + watchers: 1 |