Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rspec-rails-swagger
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rspec-rails-swagger
Commits
0860a9b7
Commit
0860a9b7
authored
Apr 28, 2017
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support formData
parent
89a8130e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
helpers.rb
lib/rspec/rails/swagger/helpers.rb
+4
-2
request_builder.rb
lib/rspec/rails/swagger/request_builder.rb
+4
-0
No files found.
lib/rspec/rails/swagger/helpers.rb
View file @
0860a9b7
...
...
@@ -216,12 +216,14 @@ module RSpec
headers
=
builder
.
headers
env
=
builder
.
env
body
=
builder
.
body
form_data
=
builder
.
form_data
# Run the request
params
=
body
||
form_data
if
::
Rails
::
VERSION
::
MAJOR
>=
5
self
.
send
(
method
,
path
,
{
params:
body
,
headers:
headers
,
env:
env
})
self
.
send
(
method
,
path
,
{
params:
params
,
headers:
headers
,
env:
env
})
else
self
.
send
(
method
,
path
,
body
,
headers
.
merge
(
env
))
self
.
send
(
method
,
path
,
params
,
headers
.
merge
(
env
))
end
if
example
.
metadata
[
:capture_examples
]
...
...
lib/rspec/rails/swagger/request_builder.rb
View file @
0860a9b7
...
...
@@ -104,6 +104,10 @@ module RSpec
instance
.
send
(
key
.
split
(
'&'
).
last
).
to_json
end
end
def
form_data
parameter_values
(
'formData'
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment