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
Added Test::Mojo::csrf_token and Test::Mojo::session methods #640
Conversation
👎 from me, it doesn't feel right, those methods are not actual tests and i never had the need to test sessions this way. |
@@ -562,6 +603,12 @@ Check response C<Content-Type> header for similar match. | |||
|
|||
Opposite of L</"content_type_like">. | |||
|
|||
=head2 csrf_token | |||
|
|||
$token = $t->csrf_token; |
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.
Formatting is wrong. (missing my
)
So it's better to keep that methods in my own submodule, isn't it? |
@alexbyk I think so. |
@alexbyk Perhaps you should have tried discussing it on IRC or the mailing list first, to see if there is broader interest before putting it up for a vote here. |
@kraih I'm not good in discussing things (maybe because my English is bad). Also I don't think that democracy is the right way to decide are my features worth to be committed in the main code or not. In my application most of post requests are protected from csrf, users can sign in and so on..., so I need those methods very often. But if you think that they are unnecessary - maybe you're right. Also as you noticed they differ a little from other methods (they don't do tests). (but on the other side |
I can only speak for myself, but the two things that make me vote 👍 are usually 1) that i want to use the feature myself, or 2) that there is broad interest in the community. Since there doesn't appear to be much interest at the moment, i'm going to close his pull request for now, if that changes i'll reopen it. |
Hi. I've created that functionality for testing secure applications for my own purposes. But may be someone will find it worth for himself.