diff options
author | francis <francis> | 2008-09-22 14:16:50 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-22 14:16:50 +0000 |
commit | 0d5c1e28c2dd26c4e978694b0a2b592cd2259f33 (patch) | |
tree | 6a7f87d0009450478d5acba8af6e3bdf2314c9bd /spec/controllers/request_controller_spec.rb | |
parent | caabec77fc02b5ba2d1ea00c8efaa21e0140505a (diff) |
Tests for new followup stuff.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 72abd89ae..a6dcd62e0 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -210,11 +210,18 @@ describe RequestController, "when creating a new request" do end -describe RequestController, "when viewing an individual response" do +describe RequestController, "when viewing an individual response for reply/followup" do integrate_views fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages, :comments # all needed as integrating views - it "should show the response" do + it "should ask for login if you are logged in as wrong person" do + session[:user_id] = users(:silly_name_user).id + get :show_response, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message) + response.should render_template('user/wrong_user') + end + + it "should show the response if you are logged in as right person" do + session[:user_id] = users(:bob_smith_user).id get :show_response, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message) response.should render_template('show_response') end |