mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #350] Make Spotify base URLs configurable for tests #111
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jjmark15 on GitHub (Jul 26, 2022).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/350
Is your feature request related to a problem? Please describe.
I want to be able to write tests against a local mock of Spotify. Spotify URLs are hard-coded in the library which makes this impractical.
e.g.
github.com/ramsayleung/rspotify@9197a908e9/src/lib.rs (L188)Describe the solution you'd like
Make target base URLs configurable.
@marioortizmanero commented on GitHub (Jul 26, 2022):
I saw
aspotifydid something like that but I always wondered why it would be useful. So you've replicated the API? Would you be able to tell me more about it?@jjmark15 commented on GitHub (Jul 26, 2022):
Sure 👍🏻 . I generally prefer black-box functional (or integration depending on terminology) testing of an API. In order to do that I need to be able to make a real HTTP call to a downstream, which usually means using an http mock. Not sure if I've explained myself well enough there 😓
@marioortizmanero commented on GitHub (Jul 29, 2022):
I was wondering whether we should have these fields as a
Stringor as aBox<str>or&'static str. It's not like anyone is going to modify the prefix URL at runtime, right?@github-actions[bot] commented on GitHub (Jun 25, 2023):
Message to comment on stale issues. If none provided, will not mark issues stale