diff --git a/__integration__/RegHubUtil-integration.js b/__integration__/RegHubUtil-integration.js index ee49ddd9da..ec239f3f2a 100644 --- a/__integration__/RegHubUtil-integration.js +++ b/__integration__/RegHubUtil-integration.js @@ -26,7 +26,8 @@ describe('RegHubUtil Integration Tests', () => { hubUtil.login(process.env.INTEGRATION_USER, process.env.INTEGRATION_PASSWORD, () => { regHubUtil.tags(`${process.env.INTEGRATION_USER}/test_private`, (error, tags) => { expect(error).toBeFalsy(); - expect(tags).toEqual(['latest']); + expect(tags.length).toEqual(1); + expect(tags[0].name).toEqual('latest'); resolve(); }); }); @@ -50,8 +51,10 @@ describe('RegHubUtil Integration Tests', () => { return new Promise((resolve) => { hubUtil.login(process.env.INTEGRATION_USER, process.env.INTEGRATION_PASSWORD, () => { regHubUtil.tags(`${process.env.INTEGRATION_USER}/test`, (error, tags) => { + console.log(tags); expect(error).toBeFalsy(); - expect(tags).toEqual(['latest']); + expect(tags.length).toEqual(1); + expect(tags[0].name).toEqual('latest'); resolve(); }); }); diff --git a/src/components/ImageCard.react.js b/src/components/ImageCard.react.js index 663a703d03..78f77a3f5a 100644 --- a/src/components/ImageCard.react.js +++ b/src/components/ImageCard.react.js @@ -122,7 +122,8 @@ var ImageCard = React.createClass({ } else if (self.state.tags.length === 0) { tags =
No Tags
; } else { - var tagDisplay = self.state.tags.map(function (t) { + var tagDisplay = self.state.tags.map(function (tag) { + let t = tag.name; if (t === self.state.chosenTag) { return
{t}
; } else { diff --git a/src/utils/RegHubUtil.js b/src/utils/RegHubUtil.js index cf00640249..e831ee945a 100644 --- a/src/utils/RegHubUtil.js +++ b/src/utils/RegHubUtil.js @@ -98,8 +98,8 @@ module.exports = { }, (error, response, body) => { if (response.statusCode === 200) { let data = JSON.parse(body); - tagServerActions.tagsUpdated({repo, tags: data.tags}); - if (callback) { callback(null, data.tags); } + tagServerActions.tagsUpdated({repo, tags: data}); + if (callback) { callback(null, data); } } else if (error || response.statusCode === 401) { repositoryServerActions.error({repo}); if (callback) { callback(new Error('Failed to fetch repos')); }