octokit 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +1 -0
- data/README.md +8 -0
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +1 -1
- data/spec/faraday/response_spec.rb +6 -6
- data/spec/helper.rb +7 -0
- data/spec/octokit/client/authorizations_spec.rb +12 -12
- data/spec/octokit/client/commits_spec.rb +31 -31
- data/spec/octokit/client/contents_spec.rb +10 -10
- data/spec/octokit/client/downloads_spec.rb +11 -11
- data/spec/octokit/client/emojis_spec.rb +2 -2
- data/spec/octokit/client/events_spec.rb +8 -8
- data/spec/octokit/client/gists_spec.rb +26 -26
- data/spec/octokit/client/issue_events_spec.rb +6 -6
- data/spec/octokit/client/issues_spec.rb +30 -30
- data/spec/octokit/client/labels_spec.rb +28 -28
- data/spec/octokit/client/markdown_spec.rb +2 -2
- data/spec/octokit/client/milestones_spec.rb +10 -10
- data/spec/octokit/client/objects_spec.rb +11 -11
- data/spec/octokit/client/organizations_spec.rb +41 -41
- data/spec/octokit/client/pub_sub_hubbub/service_hooks_spec.rb +2 -2
- data/spec/octokit/client/pub_sub_hubbub_spec.rb +4 -4
- data/spec/octokit/client/pulls_spec.rb +20 -20
- data/spec/octokit/client/refs_spec.rb +15 -15
- data/spec/octokit/client/repositories_spec.rb +83 -83
- data/spec/octokit/client/statuses_spec.rb +6 -6
- data/spec/octokit/client/users_spec.rb +48 -48
- data/spec/octokit/client_spec.rb +27 -27
- data/spec/octokit/gist_spec.rb +14 -14
- data/spec/octokit_spec.rb +6 -6
- data/spec/repository_spec.rb +21 -21
- metadata +9 -9
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
* [1.17.1 - October 11, 2012](https://github.com/pengwynn/octokit/compare/v1.17.0...v1.17.1)
|
3
4
|
* [1.17.0 - October 8, 2012](https://github.com/pengwynn/octokit/compare/v1.16.0...v1.17.0)
|
4
5
|
* [1.16.0 - September 25,2012](https://github.com/pengwynn/octokit/compare/v1.15.1...v1.16.0)
|
5
6
|
* [1.15.1 - September 24,2012](https://github.com/pengwynn/octokit/compare/v1.15.0...v1.15.1)
|
data/README.md
CHANGED
@@ -98,6 +98,7 @@ end
|
|
98
98
|
[pr]: http://help.github.com/send-pull-requests/
|
99
99
|
|
100
100
|
## Supported Ruby Versions
|
101
|
+
|
101
102
|
This library aims to support and is [tested against][travis] the following Ruby
|
102
103
|
versions:
|
103
104
|
|
@@ -116,6 +117,13 @@ implementation, you will be personally responsible for providing patches in a
|
|
116
117
|
timely fashion. If critical issues for a particular implementation exist at the
|
117
118
|
time of a major release, support for that Ruby version may be dropped.
|
118
119
|
|
120
|
+
### JSON dependency
|
121
|
+
|
122
|
+
Since JSON is included in 1.9 now, we no longer include it as a hard
|
123
|
+
dependency. Please require it explicitly if you're running Ruby 1.8
|
124
|
+
|
125
|
+
gem 'json', '~> 1.7'
|
126
|
+
|
119
127
|
## Contributors
|
120
128
|
|
121
129
|
Octokit was initially created by Wynn Netherland and [Adam
|
data/lib/octokit/version.rb
CHANGED
data/octokit.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.add_dependency 'faraday', '~> 0.8'
|
7
7
|
gem.add_dependency 'faraday_middleware', '~> 0.8'
|
8
8
|
gem.add_dependency 'hashie', '~> 1.2'
|
9
|
-
gem.add_dependency 'json', '~> 1.7'
|
10
9
|
gem.add_dependency 'multi_json', '~> 1.3'
|
10
|
+
gem.add_development_dependency 'json', '~> 1.7'
|
11
11
|
gem.add_development_dependency 'maruku'
|
12
12
|
gem.add_development_dependency 'rake'
|
13
13
|
gem.add_development_dependency 'rspec'
|
@@ -25,10 +25,10 @@ describe Faraday::Response do
|
|
25
25
|
to_return(:status => status)
|
26
26
|
end
|
27
27
|
|
28
|
-
it "
|
29
|
-
|
28
|
+
it "raises #{exception.name} error" do
|
29
|
+
expect {
|
30
30
|
@client.user('sferik')
|
31
|
-
|
31
|
+
}.to raise_error(exception)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -44,10 +44,10 @@ describe Faraday::Response do
|
|
44
44
|
to_return(:status => 400, :body => body)
|
45
45
|
end
|
46
46
|
|
47
|
-
it "
|
48
|
-
|
47
|
+
it "raises an error with the error message" do
|
48
|
+
expect {
|
49
49
|
@client.user('sferik')
|
50
|
-
|
50
|
+
}.to raise_error(Octokit::BadRequest, /#{body.values.first}/)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
data/spec/helper.rb
CHANGED
@@ -4,10 +4,17 @@ unless ENV['CI']
|
|
4
4
|
add_filter "/spec"
|
5
5
|
end
|
6
6
|
end
|
7
|
+
|
7
8
|
require 'octokit'
|
8
9
|
require 'rspec'
|
9
10
|
require 'webmock/rspec'
|
10
11
|
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.expect_with :rspec do |c|
|
14
|
+
c.syntax = :expect
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
11
18
|
def a_delete(url)
|
12
19
|
a_request(:delete, github_url(url))
|
13
20
|
end
|
@@ -8,52 +8,52 @@ describe Octokit::Client::Authorizations do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
|
11
|
-
it "
|
11
|
+
it "lists existing authorizations" do
|
12
12
|
stub_get("/authorizations").
|
13
13
|
to_return(:body => fixture("v3/authorizations.json"))
|
14
14
|
authorizations = @client.authorizations
|
15
|
-
authorizations.first.app.name.
|
15
|
+
expect(authorizations.first.app.name).to eq("Calendar About Nothing" )
|
16
16
|
end
|
17
17
|
|
18
|
-
it "
|
18
|
+
it "returns a single authorization" do
|
19
19
|
stub_get("/authorizations/999999").
|
20
20
|
to_return(:body => fixture("v3/authorization.json"))
|
21
21
|
authorization = @client.authorization(999999)
|
22
|
-
authorization.app.name.
|
22
|
+
expect(authorization.app.name).to eq("Travis" )
|
23
23
|
end
|
24
24
|
|
25
|
-
it "
|
25
|
+
it "creates a new default authorization" do
|
26
26
|
stub_post('/authorizations').
|
27
27
|
with(:body => {"scopes" => ""},
|
28
28
|
:headers => {'Content-Type'=>'application/json'}).
|
29
29
|
to_return(:body => fixture("v3/authorization.json"))
|
30
30
|
authorization = @client.create_authorization
|
31
|
-
authorization.app.name.
|
31
|
+
expect(authorization.app.name).to eq("Travis" )
|
32
32
|
end
|
33
33
|
|
34
|
-
it "
|
34
|
+
it "creates a new authorization with options" do
|
35
35
|
stub_post('/authorizations').
|
36
36
|
with(:body => {"scopes" => ["public_repo"],"note" => "admin script", "note_url" => "https://github.com/pengwynn/octokit"},
|
37
37
|
:headers => {'Content-Type'=>'application/json'}).
|
38
38
|
to_return(:body => fixture("v3/authorization.json"))
|
39
39
|
authorization = @client.create_authorization({:scopes => ["public_repo"], :note => "admin script", :note_url => "https://github.com/pengwynn/octokit"})
|
40
|
-
authorization.scopes.
|
40
|
+
expect(authorization.scopes).to include("public_repo")
|
41
41
|
end
|
42
42
|
|
43
|
-
it "
|
43
|
+
it "updates and existing authorization" do
|
44
44
|
stub_patch('/authorizations/999999').
|
45
45
|
with(:body => {"scopes"=>"", "add_scopes" => ["public_repo", "gist"]},
|
46
46
|
:headers => {'Content-Type'=>'application/json'}).
|
47
47
|
to_return(:body => fixture("v3/authorization.json"))
|
48
48
|
authorization = @client.update_authorization(999999, {:add_scopes => ['public_repo', 'gist']})
|
49
|
-
authorization.scopes.
|
49
|
+
expect(authorization.scopes).to include("public_repo")
|
50
50
|
end
|
51
51
|
|
52
|
-
it "
|
52
|
+
it "deletes an existing authorization" do
|
53
53
|
stub_delete('/authorizations/999999').
|
54
54
|
to_return(:status => 204)
|
55
55
|
authorization = @client.delete_authorization(999999)
|
56
|
-
authorization.status.
|
56
|
+
expect(authorization.status).to eq(204)
|
57
57
|
end
|
58
58
|
|
59
59
|
end
|
@@ -9,124 +9,124 @@ describe Octokit::Client::Commits do
|
|
9
9
|
|
10
10
|
describe ".commits" do
|
11
11
|
|
12
|
-
it "
|
12
|
+
it "returns all commits" do
|
13
13
|
stub_get("/repos/sferik/rails_admin/commits?per_page=35&sha=master").
|
14
14
|
to_return(:body => fixture("v3/commits.json"))
|
15
15
|
commits = @client.commits("sferik/rails_admin")
|
16
|
-
commits.first.author.login.
|
16
|
+
expect(commits.first.author.login).to eq("caboteria")
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
20
20
|
|
21
21
|
describe ".commit" do
|
22
22
|
|
23
|
-
it "
|
23
|
+
it "returns a commit" do
|
24
24
|
stub_get("/repos/sferik/rails_admin/commits/3cdfabd973bc3caac209cba903cfdb3bf6636bcd").
|
25
25
|
to_return(:body => fixture("v3/commit.json"))
|
26
26
|
commit = @client.commit("sferik/rails_admin", "3cdfabd973bc3caac209cba903cfdb3bf6636bcd")
|
27
|
-
commit.author.login.
|
27
|
+
expect(commit.author.login).to eq("caboteria")
|
28
28
|
end
|
29
29
|
|
30
30
|
end
|
31
31
|
|
32
32
|
describe ".create_commit" do
|
33
33
|
|
34
|
-
it "
|
34
|
+
it "creates a commit" do
|
35
35
|
stub_post("/repos/octocat/Hello-World/git/commits").
|
36
36
|
with(:body => { :message => "My commit message", :tree => "827efc6d56897b048c772eb4087f854f46256132", :parents => ["7d1b31e74ee336d15cbd21741bc88a537ed063a0"] },
|
37
37
|
:headers => { "Content-Type" => "application/json" }).
|
38
38
|
to_return(:body => fixture("v3/commit_create.json"))
|
39
39
|
commit = @client.create_commit("octocat/Hello-World", "My commit message", "827efc6d56897b048c772eb4087f854f46256132", "7d1b31e74ee336d15cbd21741bc88a537ed063a0")
|
40
|
-
commit.sha.
|
41
|
-
commit.message.
|
42
|
-
commit.parents.size.
|
43
|
-
commit.parents.first.sha.
|
40
|
+
expect(commit.sha).to eq("7638417db6d59f3c431d3e1f261cc637155684cd")
|
41
|
+
expect(commit.message).to eq("My commit message")
|
42
|
+
expect(commit.parents.size).to eq(1)
|
43
|
+
expect(commit.parents.first.sha).to eq("7d1b31e74ee336d15cbd21741bc88a537ed063a0")
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
47
47
|
|
48
48
|
describe ".list_commit_comments" do
|
49
49
|
|
50
|
-
it "
|
50
|
+
it "returns a list of all commit comments" do
|
51
51
|
stub_get("/repos/sferik/rails_admin/comments").
|
52
52
|
to_return(:body => fixture("v3/list_commit_comments.json"))
|
53
53
|
commit_comments = @client.list_commit_comments("sferik/rails_admin")
|
54
|
-
commit_comments.first.user.login.
|
54
|
+
expect(commit_comments.first.user.login).to eq("sferik")
|
55
55
|
end
|
56
56
|
|
57
57
|
end
|
58
58
|
|
59
59
|
describe ".commit_comments" do
|
60
60
|
|
61
|
-
it "
|
61
|
+
it "returns a list of comments for a specific commit" do
|
62
62
|
stub_get("/repos/sferik/rails_admin/commits/629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3/comments").
|
63
63
|
to_return(:body => fixture("v3/commit_comments.json"))
|
64
64
|
commit_comments = @client.commit_comments("sferik/rails_admin", "629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3")
|
65
|
-
commit_comments.first.user.login.
|
65
|
+
expect(commit_comments.first.user.login).to eq("bbenezech")
|
66
66
|
end
|
67
67
|
|
68
68
|
end
|
69
69
|
|
70
70
|
describe ".commit_comment" do
|
71
71
|
|
72
|
-
it "
|
72
|
+
it "returns a single commit comment" do
|
73
73
|
stub_get("/repos/sferik/rails_admin/comments/861907").
|
74
74
|
to_return(:body => fixture("v3/commit_comment.json"))
|
75
75
|
commit = @client.commit_comment("sferik/rails_admin", "861907")
|
76
|
-
commit.user.login.
|
76
|
+
expect(commit.user.login).to eq("bbenezech")
|
77
77
|
end
|
78
78
|
|
79
79
|
end
|
80
80
|
|
81
81
|
describe ".create_commit_comment" do
|
82
82
|
|
83
|
-
it "
|
83
|
+
it "creates a commit comment" do
|
84
84
|
stub_post("/repos/sferik/rails_admin/commits/629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3/comments").
|
85
85
|
with(:body => { :body => "Hey Eric,\r\n\r\nI think it's a terrible idea: for a number of reasons (dissections, etc.), test suite should stay deterministic IMO.\r\n", :commit_id => "629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3", :line => 1, :path => ".rspec", :position => 4 },
|
86
86
|
:headers => { "Content-Type" => "application/json" }).
|
87
87
|
to_return(:body => fixture("v3/commit_comment_create.json"))
|
88
88
|
commit_comment = @client.create_commit_comment("sferik/rails_admin", "629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3", "Hey Eric,\r\n\r\nI think it's a terrible idea: for a number of reasons (dissections, etc.), test suite should stay deterministic IMO.\r\n", ".rspec", 1, 4)
|
89
|
-
commit_comment.body.
|
90
|
-
commit_comment.commit_id.
|
91
|
-
commit_comment.path.
|
92
|
-
commit_comment.line.
|
93
|
-
commit_comment.position.
|
89
|
+
expect(commit_comment.body).to eq("Hey Eric,\r\n\r\nI think it's a terrible idea: for a number of reasons (dissections, etc.), test suite should stay deterministic IMO.\r\n")
|
90
|
+
expect(commit_comment.commit_id).to eq("629e9fd9d4df25528e84d31afdc8ebeb0f56fbb3")
|
91
|
+
expect(commit_comment.path).to eq(".rspec")
|
92
|
+
expect(commit_comment.line).to eq(1)
|
93
|
+
expect(commit_comment.position).to eq(4)
|
94
94
|
end
|
95
95
|
|
96
96
|
end
|
97
97
|
|
98
98
|
describe ".update_commit_comment" do
|
99
99
|
|
100
|
-
it "
|
100
|
+
it "updates a commit comment" do
|
101
101
|
stub_patch("/repos/sferik/rails_admin/comments/860296").
|
102
102
|
with(:body => { :body => "Hey Eric,\r\n\r\nI think it's a terrible idea. The test suite should stay deterministic IMO.\r\n" },
|
103
103
|
:headers => { "Content-Type" => "application/json" }).
|
104
104
|
to_return(:body => fixture("v3/commit_comment_update.json"))
|
105
105
|
commit_comment = @client.update_commit_comment("sferik/rails_admin", "860296", "Hey Eric,\r\n\r\nI think it's a terrible idea. The test suite should stay deterministic IMO.\r\n")
|
106
|
-
commit_comment.body.
|
106
|
+
expect(commit_comment.body).to eq("Hey Eric,\r\n\r\nI think it's a terrible idea. The test suite should stay deterministic IMO.\r\n")
|
107
107
|
end
|
108
108
|
|
109
109
|
end
|
110
110
|
|
111
111
|
describe ".delete_commit_comment" do
|
112
112
|
|
113
|
-
it "
|
113
|
+
it "deletes a commit comment" do
|
114
114
|
stub_delete("/repos/sferik/rails_admin/comments/860296").
|
115
115
|
to_return(:status => 204, :body => "")
|
116
116
|
commit_comment = @client.delete_commit_comment("sferik/rails_admin", "860296")
|
117
|
-
commit_comment.
|
117
|
+
expect(commit_comment).to be_false
|
118
118
|
end
|
119
119
|
|
120
120
|
end
|
121
121
|
|
122
122
|
describe ".compare" do
|
123
123
|
|
124
|
-
it "
|
124
|
+
it "returns a comparison" do
|
125
125
|
stub_get("/repos/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5").
|
126
126
|
to_return(:body => fixture("v3/compare.json"))
|
127
127
|
comparison = @client.compare("gvaughn/octokit", '0e0d7ae299514da692eb1cab741562c253d44188', 'b7b37f75a80b8e84061cd45b246232ad958158f5')
|
128
|
-
comparison.base_commit.sha.
|
129
|
-
comparison.merge_base_commit.sha.
|
128
|
+
expect(comparison.base_commit.sha).to eq('0e0d7ae299514da692eb1cab741562c253d44188')
|
129
|
+
expect(comparison.merge_base_commit.sha).to eq('b7b37f75a80b8e84061cd45b246232ad958158f5')
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
@@ -137,10 +137,10 @@ describe Octokit::Client::Commits do
|
|
137
137
|
to_return(:body => fixture("v3/merge.json"))
|
138
138
|
end
|
139
139
|
|
140
|
-
it "
|
140
|
+
it "merges a branch into another" do
|
141
141
|
merge = @client.merge("pengwynn/api-sandbox", "master", "new-branch", :commit_message => "Testing the merge API")
|
142
|
-
merge.sha.
|
143
|
-
merge.commit.message.
|
142
|
+
expect(merge.sha).to eq('4298c8499e0a7a160975adefdecdf9d8a5437095')
|
143
|
+
expect(merge.commit.message).to eq('Testing the merge API')
|
144
144
|
end
|
145
145
|
|
146
146
|
end
|
@@ -9,38 +9,38 @@ describe Octokit::Client::Contents do
|
|
9
9
|
|
10
10
|
describe ".readme" do
|
11
11
|
|
12
|
-
it "
|
12
|
+
it "returns the default readme" do
|
13
13
|
stub_get("/repos/pengwynn/octokit/readme").
|
14
14
|
to_return(:body => fixture("v3/readme.json"))
|
15
15
|
readme = @client.readme('pengwynn/octokit')
|
16
|
-
readme.encoding.
|
17
|
-
readme.type.
|
16
|
+
expect(readme.encoding).to eq("base64")
|
17
|
+
expect(readme.type).to eq("file")
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe ".contents" do
|
23
23
|
|
24
|
-
it "
|
24
|
+
it "returns the contents of a file" do
|
25
25
|
stub_get("/repos/pengwynn/octokit/contents/lib/octokit.rb").
|
26
26
|
to_return(:body => fixture("v3/contents.json"))
|
27
27
|
contents = @client.contents('pengwynn/octokit', :path => "lib/octokit.rb")
|
28
|
-
contents.path.
|
29
|
-
contents.name.
|
30
|
-
contents.encoding.
|
31
|
-
contents.type.
|
28
|
+
expect(contents.path).to eq("lib/octokit.rb")
|
29
|
+
expect(contents.name).to eq("lib/octokit.rb")
|
30
|
+
expect(contents.encoding).to eq("base64")
|
31
|
+
expect(contents.type).to eq("file")
|
32
32
|
end
|
33
33
|
|
34
34
|
end
|
35
35
|
|
36
36
|
describe ".archive_link" do
|
37
37
|
|
38
|
-
it "
|
38
|
+
it "returns the headers of the request" do
|
39
39
|
stub_get("/repos/pengwynn/octokit/tarball/master").
|
40
40
|
to_return(:status => 302, :body => '', :headers =>
|
41
41
|
{ 'location' => "https://nodeload.github.com/repos/pengwynn/octokit/tarball/"})
|
42
42
|
archive_link = @client.archive_link('pengwynn/octokit', :ref => "master")
|
43
|
-
archive_link
|
43
|
+
expect(archive_link).to eq("https://nodeload.github.com/repos/pengwynn/octokit/tarball/")
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
@@ -9,23 +9,23 @@ describe Octokit::Client::Downloads do
|
|
9
9
|
|
10
10
|
describe ".downloads" do
|
11
11
|
|
12
|
-
it "
|
12
|
+
it "lists available downloads" do
|
13
13
|
stub_get("/repos/github/hubot/downloads").
|
14
14
|
to_return(:body => fixture("v3/downloads.json"))
|
15
15
|
downloads = @client.downloads("github/hubot")
|
16
|
-
downloads.first.description.
|
16
|
+
expect(downloads.first.description).to eq("Robawt")
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
20
20
|
|
21
21
|
describe ".download" do
|
22
22
|
|
23
|
-
it "
|
23
|
+
it "gets a single download" do
|
24
24
|
stub_get("/repos/github/hubot/downloads/165347").
|
25
25
|
to_return(:body => fixture("v3/download.json"))
|
26
26
|
download = @client.download("github/hubot", 165347)
|
27
|
-
download.id.
|
28
|
-
download.name.
|
27
|
+
expect(download.id).to eq(165347)
|
28
|
+
expect(download.name).to eq('hubot-2.1.0.tar.gz')
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -38,26 +38,26 @@ describe Octokit::Client::Downloads do
|
|
38
38
|
:content_type => "text/plain" }).
|
39
39
|
to_return(:body => fixture("v3/download_create.json"))
|
40
40
|
end
|
41
|
-
it "
|
41
|
+
it "creates a download resource" do
|
42
42
|
resource = @client.send(:create_download_resource, "octocat/Hello-World", "download_create.json", 690, {:description => "Description of your download", :content_type => "text/plain"})
|
43
|
-
resource.s3_url.
|
43
|
+
expect(resource.s3_url).to eq("https://github.s3.amazonaws.com/")
|
44
44
|
end
|
45
45
|
|
46
|
-
it "
|
46
|
+
it "posts to an S3 url" do
|
47
47
|
stub_post("https://github.s3.amazonaws.com/").
|
48
48
|
to_return(:status => 201)
|
49
49
|
file_path = File.expand_path 'spec/fixtures/v3/download_create.json'
|
50
|
-
@client.create_download("octocat/Hello-World", file_path, {:description => "Description of your download", :content_type => "text/plain"}).
|
50
|
+
expect(@client.create_download("octocat/Hello-World", file_path, {:description => "Description of your download", :content_type => "text/plain"})).to eq(true)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
describe ".delete_download" do
|
55
55
|
|
56
|
-
it "
|
56
|
+
it "deletes a download" do
|
57
57
|
stub_request(:delete, "https://api.github.com/repos/octocat/Hellow-World/downloads/165347").
|
58
58
|
with(:headers => {'Accept'=>'*/*'}).
|
59
59
|
to_return(:status => 204, :body => "", :headers => {})
|
60
|
-
@client.delete_download('octocat/Hellow-World', 165347).status.
|
60
|
+
expect(@client.delete_download('octocat/Hellow-World', 165347).status).to eq(204)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -7,11 +7,11 @@ describe Octokit::Client::Emojis do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe ".emojis" do
|
10
|
-
it "
|
10
|
+
it "returns all github emojis" do
|
11
11
|
stub_get("/emojis").
|
12
12
|
to_return(:body => fixture("v3/emojis.json"))
|
13
13
|
emojis = @client.emojis
|
14
|
-
emojis[:metal].
|
14
|
+
expect(emojis[:metal]).to eq('https://a248.e.akamai.net/assets.github.com/images/icons/emoji/metal.png?v5')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|