mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #189] [MERGED] Add unit tests for pure methods #299
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#299
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?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/189
Author: @ramsayleung
Created: 2/27/2021
Status: ✅ Merged
Merged: 3/9/2021
Merged by: @marioortizmanero
Base:
master← Head:ramsay_add_unit_tests📝 Commits (10+)
fe55750Add test for json_insert macro and generate_random_string function.89e142badd test for headers module.cd1f9c5add test_read_token_cache test, and move all tests in oauth2.rs to test_oauth2.rs2cd8564Add tests for append_device_id function.b59982eadd test for endpoint_url and auth_headers function.8d202ffFix cargo fmt error.3f4960eFix clippy error.0afba9eadd #[cfg(test)] attribute to fix unused import warning.7cd65adupdate test_generate_random_string.faf6543add macro to create HashSet.📊 Changes
17 files changed (+413 additions, -197 deletions)
View changed files
📝
.gitignore(+1 -0)📝
CHANGELOG.md(+1 -0)📝
examples/current_user_recently_played.rs(+5 -5)📝
examples/oauth_tokens.rs(+21 -11)📝
examples/ureq/device.rs(+5 -3)📝
examples/ureq/me.rs(+5 -3)📝
examples/ureq/search.rs(+5 -3)📝
examples/ureq/seek_track.rs(+5 -3)📝
examples/webapp/src/main.rs(+3 -2)📝
examples/with_refresh_token.rs(+3 -5)📝
src/client.rs(+22 -1)📝
src/http/mod.rs(+66 -0)📝
src/lib.rs(+37 -14)➕
src/macros.rs(+42 -0)📝
src/oauth2.rs(+2 -137)➕
tests/test_oauth2.rs(+170 -0)📝
tests/test_with_oauth.rs(+20 -10)📄 Description
Description
Add unit tests for pure methods like
get_uriandget_typemethods without external dependenciesMotivation and Context
Add more unit tests for
rspotifyto make it solid and easy to maintain and refactorDependencies
None
Type of change
Add unit tests
How Has This Been Tested?
Check if all added tests pass
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.