Add spec for unescaped special characters
This commit is contained in:
parent
9e6cc6178d
commit
a6707dd40d
@ -473,6 +473,25 @@ describe "App with Riak backend" do
|
||||
end
|
||||
end
|
||||
|
||||
context "with unescaped key" do
|
||||
before do
|
||||
put "/jimmy/documents/bar:baz/john@doe.com", "John Doe"
|
||||
end
|
||||
|
||||
it "lists the document in the directory" do
|
||||
get "/jimmy/documents/bar:baz/"
|
||||
|
||||
content = JSON.parse(last_response.body)
|
||||
content.must_include "john@doe.com"
|
||||
end
|
||||
|
||||
it "delivers the data correctly" do
|
||||
get "/jimmy/documents/bar:baz/john@doe.com"
|
||||
|
||||
last_response.body.must_equal "John Doe"
|
||||
end
|
||||
end
|
||||
|
||||
context "escaped square brackets in key" do
|
||||
before do
|
||||
put "/jimmy/documents/gracehopper%5B1%5D.jpg", "super image"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user