Add specs for auth.service
See original GitHub issueAt the start there were no tests involved in this sample. But since many people found the repository useful, and probably use mainly auth.service.ts
as a starting point for their application, it seems useful to add a spec for the core thing they can copy/paste along.
I’m tagging this issue hacktoberfest/up-for-grabs, mainly because creating a start for all of this is something that can be picked up when you start out.
I prefer to have multiple PRs to do this in steps:
- First PR to re-enable jasmine and test running for this repository, with just 1
it
spec forauth.service.ts
, that runs as part of the GitHub Actions pipelines (can be a dummy test) - Second PR to properly add a good mock for the
OAuthService
and then test therunInitialLoginSequence
logic branches - Optionally a third PR to add some Jasmine Marbles based testing, to see what happens in various sequences
Let us know in the issue if you want to pick up any of these and at which timing, to prevent getting conflicts if multiple PRs come in.
(If no one feels like it that’s also fine! Then I might add it myself, later. For now I commit to actively watching for incoming PRs.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
RSpec controller specs fail after adding authorization to Rails4 ...
After adding authorization, all of my controller specs fail. My feature specs still pass because in the spec I login as admin to...
Read more >Authentication - Swagger
After you have defined the security schemes in the securitySchemes section, you can apply them to the whole API or individual operations by...
Read more >Authentication service | Edge Stack
An AuthService configures Ambassador Edge Stack to use an external service to check authentication and authorization for incoming requests. Each incoming ...
Read more >Authorization Services Guide - Keycloak
Enabling authorization services You can enable authorization services in an existing client application configured to use the OpenID Connect ...
Read more >How to Add Authorization to a Rails API Following TDD - Auth0
This piece is about adding authorization to a Ruby on Rails API by ... So, create a lib folder under the spec folder...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jeroenheijmans Thx for feedback, glad to help. I think with auth-service we’re done and you can close this issue.
PR #67 was some more excellent work! ❤️
The most important thing we now have: a test setup so that
Adding more tests now (more coverage in general, or Jasmine marbles tests, for fun) is in my opinion welcome-but-optional.
I’ll leave the issue open for a moment. @valburyakov if you want to continue the hacktoberfest PR streak and add a follow-up, you’d be most welcome. If you feel it’s all good for now, that’s totally fine too (and then I’d probably close this issue, maybe create a fresh follow-up issue).