Skip to content

Instantly share code, notes, and snippets.

@TannerRogalsky
Created March 26, 2014 23:10
Show Gist options
  • Save TannerRogalsky/b56bc886811f8f0a9d2a to your computer and use it in GitHub Desktop.
Save TannerRogalsky/b56bc886811f8f0a9d2a to your computer and use it in GitHub Desktop.
local GithubIssue = {}
local http = require("socket.http")
function GithubIssue.get(owner, repo)
local response, status_code, headers, status = http.request("github.com/repos/" .. owner .. "/" .. repo .. "/issues")
return response
end
describe("GithubIssue", function()
it("get function returns json", function()
local old_get = Github.get
Github.get = function()
return "..." -- from this: http://developer.github.com/v3/issues/#list-issues-for-a-repository
end
assert.is.truthy(GithubIssue.get(1, 2))
end)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment