|
956 | 956 | tree_result = Tree(tree_json)
|
957 | 957 | @test name(tree_result) == tree_json["sha"]
|
958 | 958 | end
|
| 959 | + |
| 960 | +@testset "Release" begin |
| 961 | + release_json = JSON.parse(""" |
| 962 | + { |
| 963 | + "url": "https://api.github.com/repos/octocat/Hello-World/releases/1", |
| 964 | + "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0", |
| 965 | + "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", |
| 966 | + "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", |
| 967 | + "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0", |
| 968 | + "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0", |
| 969 | + "id": 1, |
| 970 | + "node_id": "MDc6UmVsZWFzZTE=", |
| 971 | + "tag_name": "v1.0.0", |
| 972 | + "target_commitish": "master", |
| 973 | + "name": "v1.0.0", |
| 974 | + "body": "Description of the release", |
| 975 | + "draft": false, |
| 976 | + "prerelease": false, |
| 977 | + "created_at": "2013-02-27T19:35:32Z", |
| 978 | + "published_at": "2013-02-27T19:35:32Z", |
| 979 | + "author": { |
| 980 | + "login": "octocat", |
| 981 | + "id": 1, |
| 982 | + "node_id": "MDQ6VXNlcjE=", |
| 983 | + "avatar_url": "https://github.com/images/error/octocat_happy.gif", |
| 984 | + "gravatar_id": "", |
| 985 | + "url": "https://api.github.com/users/octocat", |
| 986 | + "html_url": "https://github.com/octocat", |
| 987 | + "followers_url": "https://api.github.com/users/octocat/followers", |
| 988 | + "following_url": "https://api.github.com/users/octocat/following{/other_user}", |
| 989 | + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", |
| 990 | + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", |
| 991 | + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", |
| 992 | + "organizations_url": "https://api.github.com/users/octocat/orgs", |
| 993 | + "repos_url": "https://api.github.com/users/octocat/repos", |
| 994 | + "events_url": "https://api.github.com/users/octocat/events{/privacy}", |
| 995 | + "received_events_url": "https://api.github.com/users/octocat/received_events", |
| 996 | + "type": "User", |
| 997 | + "site_admin": false |
| 998 | + }, |
| 999 | + "assets": [ |
| 1000 | + ] |
| 1001 | + } |
| 1002 | + """) |
| 1003 | + |
| 1004 | + release_result = Release(release_json) |
| 1005 | + @test name(release_result) == release_json["id"] |
| 1006 | +end |
0 commit comments