-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit tests for pure methods #189
Conversation
For unknown reason, the |
Maybe we should do something to make the scopes easier to use? Perhaps a In a different PR, of course, but I noticed while reading the changes in this one. |
Great idea! Probably I should make such a |
We could just reuse a macro from a crate like maplit or velcro until rust-lang/rfcs#542 is worked on. Their implementation of It's an additional dependency but considering that it's something rust is working on to include in the future we might be able to eventually remove it. But it's a RFC still so give it at least a few months. |
I just add a macro named
I personally prefer to write our You could take time to review it :) |
Great! But I meant a specific macro for scopes, that even includes the |
Yep, I have just replaced let scope: HashSet<String> = scope!("playlist-read-private", "playlist-read-collaborative");
let tok = TokenBuilder::default()
.access_token("test-access_token")
.expires_in(Duration::seconds(1))
.expires_at(Utc::now())
.scope(scope)
.refresh_token("...")
.build()
.unwrap(); |
Can you use the new |
We can continue with this PR after merging the ID's PR. As to my review, the only missing things are:
|
Great idea.
I have the same problem that
Great catch. No special reason, I just forgot to take context into consideration, so simply came with this name |
This PR can be merged after these suggestions, right? |
Yep, this PR is ready to be merged :-) |
Description
Add unit tests for pure methods like
get_uri
andget_type
methods without external dependenciesMotivation and Context
Add more unit tests for
rspotify
to 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