diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 00:06:04 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 00:06:04 +0100 |
commit | d59dd4fd5d0bff373936380a11cad6072738c946 (patch) | |
tree | d84f46b9c3af4221484024ba24cd38e870cb4c80 | |
parent | de8d3ab85a934eceab4ea77356ce80c1e5eb4220 (diff) | |
download | zorglub-d59dd4fd5d0bff373936380a11cad6072738c946.zip zorglub-d59dd4fd5d0bff373936380a11cad6072738c946.tar.gz |
add Node#redirect spec
-rw-r--r-- | spec/node_spec.rb | 6 | ||||
-rw-r--r-- | spec/spec_helper.rb | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/spec/node_spec.rb b/spec/node_spec.rb index e6b6543..dd47320 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -120,6 +120,12 @@ describe Zorglub do Node0.partial(:other_view).should == "view_content" end # + it "redirect should work" do + r = Node0.call( {'PATH_INFO'=>'/do_redirect'} ) + r.status.should == 302 + r.header['location'].should == Node0.r(:do_partial,1,2,3) + end + # end # end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4c86527..f3e4941 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -56,6 +56,9 @@ class Node0 < Zorglub::Node engine 'real' view r('do_partial') end + def do_redirect + redirect r(:do_partial,1,2,3) + end end # class Node1 < Zorglub::Node |