diff --git a/README.md b/README.md index 09f4dc0..1325414 100755 --- a/README.md +++ b/README.md @@ -54,11 +54,6 @@ When adding the slash commands to Slack be sure to point all commands at a POST /dequeue all ``` -### Remove is easier to spell than dequeue... -``` -/remove all -``` - ### Get or set the default playlist. ``` # sets the playlist diff --git a/src/commands.js b/src/commands.js index 6820615..7fab7dc 100644 --- a/src/commands.js +++ b/src/commands.js @@ -305,7 +305,6 @@ function exec({ text, user_name, command }) { case '/queue': return getQueue(); case '/dequeue': - case '/remove': if (isNaN(text)) { if (text.toLowerCase().trim() === 'all') { return clearQueue(user_name) diff --git a/test/test_commands.js b/test/test_commands.js index d7f2a75..1b2abd9 100644 --- a/test/test_commands.js +++ b/test/test_commands.js @@ -754,45 +754,4 @@ describe('The Slack commands for Spotify Local ', () => { }); - - describe('The /remove command', () => { - - const command = '/remove'; - const user_name = 'david'; - - describe('does the same thing as /dequeue', () => { - const text = 'all'; - - beforeEach((done) => { - sinon.stub(request, 'delete') - .callsFake(() => - openMock('local/spotify/api/queue/delete') - ); - done(); - }); - - afterEach((done) => { - request.delete.restore(); - done(); - }); - - it('resolves with text for slack', (done) => { - exec({ command, user_name, text }) - .then((resp) => { - expect(resp).to.be.a('string'); - expect(resp).to.eq( - 'Queue cleared by david. Tracks removed:\n' + - '"Blood on Me" by Sampha requested by Donald\n' + - '"You Are in My System" by The System requested by Walter\n'+ - '"Running Up That Hill (A Deal With God)" by Kate Bush requested by Jeff\n' + - '"JoHn Muir" by ScHoolboy Q requested by Donald\n' + - '"My Collection" by Future requested by Mike' - ); - done(); - }) - .catch(done); - }); - }); - }); - });