Skip to content

Commit

Permalink
Rename query to q in tests for consistency (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
JMPerez authored Sep 13, 2018
1 parent 8b4aecb commit 5f58995
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions __tests__/spotify-web-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ describe('Spotify Web API', () => {
body: {
albums: {
href:
'https://api.spotify.com/v1/search?query=The+Best+of+Keane&offset=2&limit=3&type=album'
'https://api.spotify.com/v1/search?q=The+Best+of+Keane&offset=2&limit=3&type=album'
}
},
headers: {
Expand All @@ -609,7 +609,7 @@ describe('Spotify Web API', () => {
api.searchAlbums('The Best of Keane', { limit: 3, offset: 2 }).then(
function(data) {
expect(data.body.albums.href).toBe(
'https://api.spotify.com/v1/search?query=The+Best+of+Keane&offset=2&limit=3&type=album'
'https://api.spotify.com/v1/search?q=The+Best+of+Keane&offset=2&limit=3&type=album'
);
expect(data.statusCode).toBe(200);
expect('value').toBe(data.headers.test);
Expand Down Expand Up @@ -642,7 +642,7 @@ describe('Spotify Web API', () => {
body: {
albums: {
href:
'https://api.spotify.com/v1/search?query=The+Best+of+Keane&offset=2&limit=3&type=album'
'https://api.spotify.com/v1/search?q=The+Best+of+Keane&offset=2&limit=3&type=album'
}
}
});
Expand All @@ -655,7 +655,7 @@ describe('Spotify Web API', () => {
) {
expect(err).toBeFalsy();
expect(data.body.albums.href).toBe(
'https://api.spotify.com/v1/search?query=The+Best+of+Keane&offset=2&limit=3&type=album'
'https://api.spotify.com/v1/search?q=The+Best+of+Keane&offset=2&limit=3&type=album'
);
done();
});
Expand All @@ -681,7 +681,7 @@ describe('Spotify Web API', () => {
body: {
playlists: {
href:
'https://api.spotify.com/v1/search?query=workout&offset=0&limit=1&type=playlist'
'https://api.spotify.com/v1/search?q=workout&offset=0&limit=1&type=playlist'
}
}
});
Expand All @@ -691,7 +691,7 @@ describe('Spotify Web API', () => {
api.searchPlaylists('workout', { limit: 1, offset: 0 }).then(
function(data) {
expect(data.body.playlists.href).toBe(
'https://api.spotify.com/v1/search?query=workout&offset=0&limit=1&type=playlist'
'https://api.spotify.com/v1/search?q=workout&offset=0&limit=1&type=playlist'
);
done();
},
Expand Down Expand Up @@ -722,7 +722,7 @@ describe('Spotify Web API', () => {
body: {
artists: {
href:
'https://api.spotify.com/v1/search?query=David+Bowie&offset=1&limit=5&type=artist'
'https://api.spotify.com/v1/search?q=David+Bowie&offset=1&limit=5&type=artist'
}
}
});
Expand All @@ -732,7 +732,7 @@ describe('Spotify Web API', () => {
api.searchArtists('David Bowie', { limit: 5, offset: 1 }).then(
function(data) {
expect(data.body.artists.href).toBe(
'https://api.spotify.com/v1/search?query=David+Bowie&offset=1&limit=5&type=artist'
'https://api.spotify.com/v1/search?q=David+Bowie&offset=1&limit=5&type=artist'
);
done();
},
Expand Down Expand Up @@ -762,7 +762,7 @@ describe('Spotify Web API', () => {
body: {
artists: {
href:
'https://api.spotify.com/v1/search?query=David+Bowie&offset=1&limit=5&type=artist'
'https://api.spotify.com/v1/search?q=David+Bowie&offset=1&limit=5&type=artist'
}
}
});
Expand All @@ -775,7 +775,7 @@ describe('Spotify Web API', () => {
) {
expect(err).toBeFalsy();
expect(data.body.artists.href).toBe(
'https://api.spotify.com/v1/search?query=David+Bowie&offset=1&limit=5&type=artist'
'https://api.spotify.com/v1/search?q=David+Bowie&offset=1&limit=5&type=artist'
);
done();
});
Expand All @@ -801,7 +801,7 @@ describe('Spotify Web API', () => {
body: {
tracks: {
href:
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track'
}
}
});
Expand All @@ -811,7 +811,7 @@ describe('Spotify Web API', () => {
api.searchTracks('Mr. Brightside', { limit: 3, offset: 2 }).then(
function(data) {
expect(data.body.tracks.href).toBe(
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track'
);
done();
},
Expand Down Expand Up @@ -842,7 +842,7 @@ describe('Spotify Web API', () => {
body: {
tracks: {
href:
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track'
}
}
});
Expand All @@ -855,7 +855,7 @@ describe('Spotify Web API', () => {
) {
expect(err).toBeFalsy();
expect(data.body.tracks.href).toBe(
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track'
);
done();
});
Expand All @@ -881,7 +881,7 @@ describe('Spotify Web API', () => {
body: {
tracks: {
href:
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track,album'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track,album'
}
}
});
Expand All @@ -895,7 +895,7 @@ describe('Spotify Web API', () => {
function(err, data) {
expect(err).toBeFalsy();
expect(data.body.tracks.href).toBe(
'https://api.spotify.com/v1/search?query=Mr.+Brightside&offset=2&limit=3&type=track,album'
'https://api.spotify.com/v1/search?q=Mr.+Brightside&offset=2&limit=3&type=track,album'
);
done();
}
Expand Down

0 comments on commit 5f58995

Please sign in to comment.