Skip to content
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 'multipart?' request helper #1495

Merged
merged 2 commits into from
May 17, 2021
Merged

Conversation

nodeMD
Copy link
Contributor

@nodeMD nodeMD commented May 14, 2021

Purpose

Fixes #1494

Description

Adds 'multipart?' request helper

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@matthewmcgarvey matthewmcgarvey linked an issue May 14, 2021 that may be closed by this pull request
Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

This looks like another great contribution! Just one small change to make sure we can catch a wider range.

src/lucky/request_type_helpers.cr Outdated Show resolved Hide resolved
@nodeMD nodeMD requested a review from jwoertink May 14, 2021 17:21
Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

Great work! Thanks for taking care of this.

@@ -71,7 +71,7 @@ describe Lucky::RequestTypeHelpers do
action = FakeAction.new
action.multipart?.should(be_false)

action.context.request.headers["Content-Type"] = "multipart/form-data"
action.context.request.headers["Content-Type"] = "multipart/form-data; boundary="
Copy link
Member

Choose a reason for hiding this comment

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

ah nice! 👍

@jwoertink jwoertink merged commit 2e60eb7 into luckyframework:master May 17, 2021
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.

Add new multipart? request helper
3 participants