aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2007-11-13 12:47:05 +0000
committerfrancis <francis>2007-11-13 12:47:05 +0000
commitade4033c3ffbbf321f65aca25493a6e80a1097d7 (patch)
treefbebbf765005e51d428ea0b4495072ea0bc0ea24 /spec/controllers/request_controller_spec.rb
parent1da2acc5a2b9cd518b57f13ec9927333d6e7cfa8 (diff)
Test display of incoming emails.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 9c0997569..bca0a2a57 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -48,7 +48,8 @@ describe RequestController, "when listing all requests" do
end
describe RequestController, "when showing one request" do
- fixtures :info_requests
+ integrate_views
+ fixtures :info_requests, :public_bodies, :users # all needed as integrating views
it "should be successful" do
get :show, :id => 101
@@ -64,6 +65,13 @@ describe RequestController, "when showing one request" do
get :show, :id => 101
assigns[:info_request].should == info_requests(:fancy_dog_request)
end
+
+ it "should show incoming messages" do
+ ir = info_requests(:fancy_dog_request)
+ receive_incoming_mail('incoming-request-plain.email', ir.incoming_email)
+ get :show, :id => 101
+ assigns[:correspondences].size.should == 1
+ end
end
# XXX do this for invalid ids