Skip to content

Add passwordless test helpers#90

Merged
mikker merged 3 commits into
mikker:masterfrom
rickychilcott:master
Nov 2, 2020
Merged

Add passwordless test helpers#90
mikker merged 3 commits into
mikker:masterfrom
rickychilcott:master

Conversation

@rickychilcott

Copy link
Copy Markdown
Collaborator

This is a PR to add test helpers for test unit and rspec. I tried this locally on a project I'm using and it works ok, but I'm only using rspec. Someone who has a good example test unit project should try this or some tests can be integrated into a passwordless example app.

This takes a lot of code and ideas from #71 so no credit is taken here, just trying to pull together to get to this as part of a 1.0 release (#89).

Close #71 and address #29

@mikker mikker left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this @rickychilcott!

They'll have to be modified a bit for 1.0 but that doesn't mean they aren't a great addition. A few remarks and suggestions, otherwise looks great!

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@rickychilcott rickychilcott requested a review from mikker November 2, 2020 12:25
@rickychilcott

Copy link
Copy Markdown
Collaborator Author

Thanks @mikker. I made the requested changes.

I was modeling some of the syntax off of https://github.com/thoughtbot/clearance#controller-test-helpers but I looked too quickly and didn't realize that they effectively shim the current_user if you just did a sign_in without doing sign_in_as(user), so I dropped my weird overloading of the passwordless_sign_in/passwordless_sign_in(user) form.

Let me know if you'd like any other changes.

@mikker mikker left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💙💚💛💜❤️

@mikker mikker merged commit b1aca11 into mikker:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test helpers

2 participants