summaryrefslogtreecommitdiff
path: root/test/spec_response.rb
diff options
context:
space:
mode:
authorBrent Wheeldon <brent.wheeldon@gmail.com>2015-04-14 11:52:43 -0400
committerBrent Wheeldon <brent.wheeldon@gmail.com>2015-04-14 15:11:57 -0400
commitb79e15304213403858538f45b8d1928376776ddb (patch)
treeaea8a9387739fe24e166591df553bb890533b7d3 /test/spec_response.rb
parentd68b93a9922b8bbfd76d5c7bcf5b63f2aec8f36f (diff)
downloadrack-b79e15304213403858538f45b8d1928376776ddb.tar.gz
Add HTTP response helpers for 204, 301, and 412.
Diffstat (limited to 'test/spec_response.rb')
-rw-r--r--test/spec_response.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/spec_response.rb b/test/spec_response.rb
index 6b13c0c9..20a2d0c3 100644
--- a/test/spec_response.rb
+++ b/test/spec_response.rb
@@ -231,6 +231,14 @@ describe Rack::Response do
res.should.be.successful
res.should.be.accepted
+ res.status = 204
+ res.should.be.successful
+ res.should.be.no_content
+
+ res.status = 301
+ res.should.be.redirect
+ res.should.be.moved_permanently
+
res.status = 400
res.should.not.be.successful
res.should.be.client_error
@@ -251,6 +259,11 @@ describe Rack::Response do
res.should.be.client_error
res.should.be.method_not_allowed
+ res.status = 412
+ res.should.not.be.successful
+ res.should.be.client_error
+ res.should.be.precondition_failed
+
res.status = 418
res.should.not.be.successful
res.should.be.client_error