-
Notifications
You must be signed in to change notification settings - Fork 228
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 the request spec helper method, #login_user. #57
Add the request spec helper method, #login_user. #57
Conversation
checks are failed...should I use the hash rocket? |
@ebihara99999 try merging/rebasing the upstream changes and see if that fixes travis. (Now that we've removed the older version on HEAD) |
6782e3f
to
c1ca954
Compare
@athix |
@ebihara99999 Sorry for the late reply. I can't see an easy way to configure the ruby version from codacy, so I'm adding a rubocop config that should hopefully solve the issue. From there we should be able to rebase this branch and merge. |
@athix Thanks for dealing with it! |
c1ca954
to
c265b7a
Compare
At first I rebased the upstream changes, but it kept failing. But I found it was able to be fixed by removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I'd like to test this locally and see how it interacts with rspec and such, but I don't have the time currently. That said, this shouldn't be able to affect any existing projects negatively. I think we're good to go on merging here.
module Request | ||
# Accepts arguments for user to login, the password, route to use and HTTP method | ||
# Defaults - @user, 'secret', 'user_sessions_url' and http_method: POST | ||
def login_user(user = nil, password = 'secret', route = nil, http_method = :post) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if secret being the password default makes the most sense here...I can't think of anything that would make more sense off the top of my head though, so I think it should be fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the password default value. I added modification from Integration#login, which forces us to use ‘secret’. I don’t think the deafault value isn’t needed because what is really needed is to choose the password value, and I will remove the value if necessary.
I also have the same opinion for testing. I'm sorry I don't add the test. But even more, IMO, I would like to give some modifications to tests now step by step if I have time. Sometimes testing is not easy because test codes are a little bit old. |
This looks good to me., and you two should feel free to merge things like this without me if you want. I'm always happy to weigh in, but I don't want to hold everyone up just because I'm busy. |
Thank you for saying that, even though I'm just a contributor and can't close issues and merge PRs, I feel free to move thing forward @Ch4s3 |
Any news on this ? 🙏 |
There is no test helper for request specs now. It' not convenient officially recommending to write request specs to a new rails app.
If this PR is merged, I will add the documentation how to use the helper.
Thank you for review.