spec/github/repos/hooks_spec.rb in github_api-0.2.1 vs spec/github/repos/hooks_spec.rb in github_api-0.2.2
- old
+ new
@@ -17,11 +17,11 @@
github.user, github.repo = nil, nil
expect { github.repos.hooks }.to raise_error(ArgumentError)
end
it "should get the resources" do
- github.repos.hooks(user, repo)
+ github.repos.hooks user, repo
a_get("/repos/#{user}/#{repo}/hooks").should have_been_made
end
it "should return array of resources" do
hooks = github.repos.hooks user, repo
@@ -220,11 +220,11 @@
}.to raise_error(Github::ResourceNotFound)
end
end
end # edit_hook
- describe "delete_key" do
+ describe "delete_hook" do
let(:hook_id) { 1 }
context "resource edited successfully" do
before do
stub_delete("/repos/#{user}/#{repo}/hooks/#{hook_id}").
@@ -236,10 +236,10 @@
expect { github.repos.delete_hook }.to raise_error(ArgumentError)
end
it "should fail to delete resource without 'hook_id'" do
expect {
- github.repos.edit_hook user, repo
+ github.repos.delete_hook user, repo
}.to raise_error(ArgumentError)
end
it "should delete the resource" do
github.repos.delete_hook user, repo, hook_id