parent
d1f049a8c3
commit
8dad3353e9
@ -1,79 +0,0 @@
|
|||||||
From d3e32e0ef2539a6e6c79022ee63807317074fb4f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
|
||||||
Date: Fri, 2 Sep 2016 12:25:29 +0200
|
|
||||||
Subject: [PATCH] Fix test suite for Rack 2.x compatiblity.
|
|
||||||
|
|
||||||
---
|
|
||||||
spec/rack/test/utils_spec.rb | 14 +++++++-------
|
|
||||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/spec/rack/test/utils_spec.rb b/spec/rack/test/utils_spec.rb
|
|
||||||
index 3b27767..4557c5b 100644
|
|
||||||
--- a/spec/rack/test/utils_spec.rb
|
|
||||||
+++ b/spec/rack/test/utils_spec.rb
|
|
||||||
@@ -61,7 +61,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["submit-name"].should == "Larry"
|
|
||||||
check params["files"][:filename].should == "foo.txt"
|
|
||||||
params["files"][:tempfile].read.should == "bar\n"
|
|
||||||
@@ -77,7 +77,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["submit-name"].should == "Larry"
|
|
||||||
|
|
||||||
check params["files"][0][:filename].should == "foo.txt"
|
|
||||||
@@ -97,7 +97,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["people"][0]["submit-name"].should == "Larry"
|
|
||||||
check params["people"][0]["files"][:filename].should == "foo.txt"
|
|
||||||
params["people"][0]["files"][:tempfile].read.should == "bar\n"
|
|
||||||
@@ -114,7 +114,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["files"][:filename].should == "foo.txt"
|
|
||||||
params["files"][:tempfile].read.should == "bar\n"
|
|
||||||
check params["foo"].should == [{"id" => "1", "name" => "Dave"}, {"id" => "2", "name" => "Steve"}]
|
|
||||||
@@ -132,7 +132,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["files"][:filename].should == "foo.txt"
|
|
||||||
params["files"][:tempfile].read.should == "bar\n"
|
|
||||||
check params["foo"].should == {"bar" => [{"id" => "1", "name" => "Dave"},
|
|
||||||
@@ -150,7 +150,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["files"][0][:filename].should == "foo.txt"
|
|
||||||
params["files"][0][:tempfile].read.should == "bar\n"
|
|
||||||
check params["foo"][0].should == "1"
|
|
||||||
@@ -168,7 +168,7 @@ describe Rack::Test::Utils do
|
|
||||||
:input => StringIO.new(data)
|
|
||||||
}
|
|
||||||
env = Rack::MockRequest.env_for("/", options)
|
|
||||||
- params = Rack::Utils::Multipart.parse_multipart(env)
|
|
||||||
+ params = Rack::Multipart.parse_multipart(env)
|
|
||||||
check params["foo"][0]["id"].should == "1"
|
|
||||||
check params["foo"][0]["data"][:filename].should == "foo.txt"
|
|
||||||
params["foo"][0]["data"][:tempfile].read.should == "bar\n"
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1 +1,2 @@
|
|||||||
c7db48faa3d1887198f7ce56726990e8 rack-test-0.6.3.gem
|
SHA512 (rack-test-0.8.3-spec.tgz) = 0e173f39492b34279e76d4c6ac79f82db6ec13ddb6eb865bbcd6f1ab86ffcb9766c51f95e0ed7f954243feb708cc3a688d9fb406d517f05a060145d8758b361f
|
||||||
|
SHA512 (rack-test-0.8.3.gem) = 455a5ef0402e9358617f8c7f08d8dc6351dfca6b672fad7bf3bbc858b5042ed05bf7d437420e783940fb6251f1e1312e9e63721d236a7488f388cef18261de0d
|
||||||
|
Loading…
Reference in new issue