aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-08-23 11:34:38 +0100
committerLouise Crow <louise.crow@gmail.com>2012-08-23 11:36:52 +0100
commit95f6352e4f9cb95c93c423d0a298c51022261ea0 (patch)
tree6d92e64d53614623ea9aaf52df3902f681d95748 /spec/controllers/request_controller_spec.rb
parent452472652df3cb7e64529e0511347e7d941b9e1c (diff)
Don't error on a request to followup an external request.
Partial solution to #562.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 6e5498a9f..6cbe1c836 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1014,6 +1014,22 @@ describe RequestController, "when viewing an individual response for reply/follo
get :show_response, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message)
response.should render_template('request/hidden')
end
+
+ describe 'when viewing a response for an external request' do
+
+ it 'should show a message saying that external requests cannot be followed up' do
+ get :show_response, :id => info_requests(:external_request).id
+ response.should render_template('request/followup_bad')
+ assigns[:reason].should == 'external'
+ end
+
+ it 'should be successful' do
+ get :show_response, :id => info_requests(:external_request).id
+ response.should be_success
+ end
+
+ end
+
end
describe RequestController, "when classifying an information request" do