From e399e78747a7211c3072719add00b75092de8a5d Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Fri, 26 Mar 2021 20:57:51 +1300 Subject: [PATCH] Updating unit tests with new base64 URLs --- __tests__/components/__snapshots__/GridItem.test.js.snap | 6 +++--- __tests__/util/helpers.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/components/__snapshots__/GridItem.test.js.snap b/__tests__/components/__snapshots__/GridItem.test.js.snap index 13c41b58..9d17486d 100644 --- a/__tests__/components/__snapshots__/GridItem.test.js.snap +++ b/__tests__/components/__snapshots__/GridItem.test.js.snap @@ -5,7 +5,7 @@ exports[` should handle album 1`] = ` className="grid__item grid__item--album " data-qa-file="Link" data-qa-node="RouterLink" - href="/album/local%3Aalbum%3Amd5%3A66fbea3593ba96a15a9d4188bebab50b" + href="/album/bG9jYWw6YWxidW06bWQ1OjY2ZmJlYTM1OTNiYTk2YTE1YTlkNDE4OGJlYmFiNTBi" onClick={[Function]} onContextMenu={[Function]} > @@ -86,7 +86,7 @@ exports[` should handle artist 1`] = ` className="grid__item grid__item--artist " data-qa-file="Link" data-qa-node="RouterLink" - href="/artist/local%3Aartist%3Amd5%3A4f6e4f979e2c40c5e6ad1735804c29bc" + href="/artist/bG9jYWw6YXJ0aXN0Om1kNTo0ZjZlNGY5NzllMmM0MGM1ZTZhZDE3MzU4MDRjMjliYw==" onClick={[Function]} onContextMenu={[Function]} > @@ -151,7 +151,7 @@ exports[` should handle playlist 1`] = ` className="grid__item grid__item--playlist " data-qa-file="Link" data-qa-node="RouterLink" - href="/playlist/m3u%3ALocal%20tester.m3u8" + href="/playlist/bTN1OkxvY2FsJTIwdGVzdGVyLm0zdTg=" onClick={[Function]} onContextMenu={[Function]} > diff --git a/__tests__/util/helpers.test.js b/__tests__/util/helpers.test.js index 848e4773..b8cc5747 100755 --- a/__tests__/util/helpers.test.js +++ b/__tests__/util/helpers.test.js @@ -153,13 +153,13 @@ describe('buildLink', () => { it('should build uri into link as a string', () => { let link = helpers.buildLink('spotify:album:123'); expect(typeof (link)).toBe('string'); - expect(link).toBe('/album/spotify%3Aalbum%3A123'); + expect(link).toBe('/album/c3BvdGlmeTphbGJ1bToxMjM='); }); it('should handle special characters', () => { let link = helpers.buildLink('spotify:album:http://test.com/123!@#$%^&[];<>/?" .mp3'); expect(typeof (link)).toBe('string'); - expect(link).toBe('/album/spotify%3Aalbum%3Ahttp%3A%2F%2Ftest.com%2F123!%40%23%24%25%5E%26%5B%5D%3B%3C%3E%2F%3F%22%20.mp3'); + expect(link).toBe('/album/c3BvdGlmeTphbGJ1bTpodHRwOi8vdGVzdC5jb20vMTIzIUAjJCVeJltdOzw+Lz8iIC5tcDM='); }); });