Repository: TheOdinProject/odin-bot-v2
Pull request #178 (2021-08-24 19:06:36)

Removed partyParrot broken links and updated tests for it
<!-- 
Thanks for your interest in The Odin Project's Odin Bot. In order to get PRs closed in a reasonable amount of time, we request that you include a baseline of information about the changes you are proposing. Please answer the following triage questions:
-->

 - [X] You have read the [Odin Bot Contributing Guide](https://github.com/TheOdinProject/odin-bot-v2/wiki/Contributing-Guide).

#### 1.Describe the changes made:

The pull request covers the party parrot command. Few of the GIFs linked were not working due to broken links and those have been removed as well as the corresponding tests have been updated alongside the snapshots of it.

#### 2. If this PR is related to an open issue please reference it with the `#` operator and the issue number below:

#XXXXX



Patch:
diff --git a/botCommands/partyParrot.js b/botCommands/partyParrot.js
index 8ea23ae..7e74732 100644
--- a/botCommands/partyParrot.js
+++ b/botCommands/partyParrot.js
@@ -7,14 +7,9 @@ const command = {
     const parrots = [
       'https://cultofthepartyparrot.com/parrots/hd/dadparrot.gif',
       'http://cultofthepartyparrot.com/parrots/parrot.gif',
-      'http://cultofthepartyparrot.com/parrots/shuffleparrot.gif',
-      'http://cultofthepartyparrot.com/parrots/parrotcop.gif',
       'http://cultofthepartyparrot.com/parrots/fiestaparrot.gif',
       'http://cultofthepartyparrot.com/parrots/explodyparrot.gif',
-      'http://cultofthepartyparrot.com/parrots/aussieparrot.gif',
       'http://cultofthepartyparrot.com/parrots/slomoparrot.gif',
-      'http://cultofthepartyparrot.com/parrots/stableparrot.gif',
-      'http://cultofthepartyparrot.com/parrots/twinsparrot.gif',
       'http://cultofthepartyparrot.com/parrots/hd/dealwithitparrot.gif',
       'http://cultofthepartyparrot.com/parrots/tripletsparrot.gif',
       'http://emojis.slackmojis.com/emojis/images/1450738632/246/leftshark.png',


Test patch:
diff --git a/botCommands/__snapshots__/partyParrot.test.js.snap b/botCommands/__snapshots__/partyParrot.test.js.snap
index 0d9e0b2..09d95f0 100644
--- a/botCommands/__snapshots__/partyParrot.test.js.snap
+++ b/botCommands/__snapshots__/partyParrot.test.js.snap
@@ -14,24 +14,14 @@ exports[`partyparrot snapshot when randomInt is mocked, the output remains the s
 
 exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 2`] = `"http://cultofthepartyparrot.com/parrots/parrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 3`] = `"http://cultofthepartyparrot.com/parrots/shuffleparrot.gif"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 3`] = `"http://cultofthepartyparrot.com/parrots/fiestaparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 4`] = `"http://cultofthepartyparrot.com/parrots/parrotcop.gif"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 4`] = `"http://cultofthepartyparrot.com/parrots/explodyparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 5`] = `"http://cultofthepartyparrot.com/parrots/fiestaparrot.gif"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 5`] = `"http://cultofthepartyparrot.com/parrots/slomoparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 6`] = `"http://cultofthepartyparrot.com/parrots/explodyparrot.gif"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 6`] = `"http://cultofthepartyparrot.com/parrots/hd/dealwithitparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 7`] = `"http://cultofthepartyparrot.com/parrots/aussieparrot.gif"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 7`] = `"http://cultofthepartyparrot.com/parrots/tripletsparrot.gif"`;
 
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 8`] = `"http://cultofthepartyparrot.com/parrots/slomoparrot.gif"`;
-
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 9`] = `"http://cultofthepartyparrot.com/parrots/stableparrot.gif"`;
-
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 10`] = `"http://cultofthepartyparrot.com/parrots/twinsparrot.gif"`;
-
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 11`] = `"http://cultofthepartyparrot.com/parrots/hd/dealwithitparrot.gif"`;
-
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 12`] = `"http://cultofthepartyparrot.com/parrots/tripletsparrot.gif"`;
-
-exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 13`] = `"http://emojis.slackmojis.com/emojis/images/1450738632/246/leftshark.png"`;
+exports[`partyparrot snapshot when randomInt is mocked, the output remains the same 8`] = `"http://emojis.slackmojis.com/emojis/images/1450738632/246/leftshark.png"`;
diff --git a/botCommands/partyParrot.test.js b/botCommands/partyParrot.test.js
index 6a7a33e..df9ca11 100644
--- a/botCommands/partyParrot.test.js
+++ b/botCommands/partyParrot.test.js
@@ -70,7 +70,7 @@ describe('partyparrot snapshot', () => {
   it('when randomInt is mocked, the output remains the same', () => {
     // NOTE: if the length of the parrot array changes,
     // this for loop will need to be updated to reflect that change
-    for (let i = 0; i < 13; i += 1) {
+    for (let i = 0; i < 8; i += 1) {
       randomInt.mockReturnValueOnce(i);
 
       expect(command.cb({ content: '' })).toMatchSnapshot();