aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
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