about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-24 00:20:03 +0100
committerGitHub <noreply@github.com>2020-01-24 00:20:03 +0100
commitdee853f23c65988d505796d11ac71c0fd2f8053e (patch)
treebb91b9e1dc3ad8adde786f11af46dc2b68376048 /spec
parent105f83fc1e4830186e9d7cb91c5d4fda1798c602 (diff)
Remove bad encoding middleware (#12931)
Revert #12741
Diffstat (limited to 'spec')
-rw-r--r--spec/middleware/handle_bad_encoding_middleware_spec.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/middleware/handle_bad_encoding_middleware_spec.rb b/spec/middleware/handle_bad_encoding_middleware_spec.rb
deleted file mode 100644
index 8c0d24f18..000000000
--- a/spec/middleware/handle_bad_encoding_middleware_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe HandleBadEncodingMiddleware do
-  let(:app) { double() }
-  let(:middleware) { HandleBadEncodingMiddleware.new(app) }
-
-  it "request with query string is unchanged" do
-    expect(app).to receive(:call).with("PATH" => "/some/path", "QUERY_STRING" => "name=fred")
-    middleware.call("PATH" => "/some/path", "QUERY_STRING" => "name=fred")
-  end
-
-  it "request with no query string is unchanged" do
-    expect(app).to receive(:call).with("PATH" => "/some/path")
-    middleware.call("PATH" => "/some/path")
-  end
-
-  it "request with invalid encoding in query string drops query string" do
-    expect(app).to receive(:call).with("QUERY_STRING" => "", "PATH" => "/some/path")
-    middleware.call("QUERY_STRING" => "q=%2Fsearch%2Fall%Forder%3Ddescending%26page%3D5%26sort%3Dcreated_at", "PATH" => "/some/path")
-  end
-end