| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -230,4 +230,21 @@ describe("Tag", function() { | |||
| 230 | 230 | assert.equal(object.isCommit(), true); | |
| 231 | 231 | }); | |
| 232 | 232 | }); | |
| 233 | + | ||
| 234 | + it("can get tag's target id", function() { | ||
| 235 | + return this.repository.getTagByName(tagName) | ||
| 236 | + .then(function(tag) { | ||
| 237 | + assert.equal(commitPointedTo, tag.targetId()); | ||
| 238 | + }); | ||
| 239 | + }); | ||
| 240 | + | ||
| 241 | + it("can get tag's owner", function() { | ||
| 242 | + var repository = this.repository; | ||
| 243 | + return this.repository.getTagByName(tagName) | ||
| 244 | + .then(function(tag) { | ||
| 245 | + var owner = tag.owner(); | ||
| 246 | + assert.ok(owner instanceof Repository); | ||
| 247 | + assert.equal(repository.path(), owner.path()); | ||
| 248 | + }); | ||
| 249 | + }); | ||
| 233 | 250 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments