diff --git a/spec/jquery.github.repo-spec.js b/spec/jquery.github.repo-spec.js index 88464bb..28c4d12 100644 --- a/spec/jquery.github.repo-spec.js +++ b/spec/jquery.github.repo-spec.js @@ -34,11 +34,6 @@ describe("jquery.github.repo", function() { .toEqual("2013-07-02T12:08:36Z"); }); - it("should be repository's api url", function() { - expect(instance.url) - .toEqual("https://api.github.com/repos/zenorocha/jquery-github"); - }); - it("should be repository's number of stargazers", function() { expect(instance.stargazers) .toEqual(131); @@ -52,14 +47,4 @@ describe("jquery.github.repo", function() { }); }); - describe("execute _parseURL()", function() { - it("should parse repository's url attribute", function() { - expect(instance._parseURL(instance.url)) - .toEqual("https://github.com/zenorocha/jquery-github"); - }); - }); - - describe("execute toHTML()", function() { - // TODO - }); }); diff --git a/src/jquery.github.js b/src/jquery.github.js index 197663b..97f0871 100644 --- a/src/jquery.github.js +++ b/src/jquery.github.js @@ -6,14 +6,13 @@ function GithubRepo( repo ) { this.name = repo.name; this.open_issues = repo.open_issues; this.pushed_at = repo.pushed_at; - this.url = repo.url; + this.url = repo.html_url; this.stargazers = repo.stargazers_count; } // Parses HTML template GithubRepo.prototype.toHTML = function () { - this.pushed_at = this._parsePushedDate( this.pushed_at ), - this.url = this._parseURL( this.url ); + this.pushed_at = this._parsePushedDate( this.pushed_at ); return $( "