aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2007-11-15 13:21:08 +0000
committerfrancis <francis>2007-11-15 13:21:08 +0000
commit6574585f67cd11fedc238f0590af3ae60babf0d5 (patch)
tree1f00d28914c359c7a3ce200de8b147d8fdde4953 /spec/controllers/request_controller_spec.rb
parent19529a96c5fdd2f5ae7292728d2bf36d131bc78b (diff)
Add outgoing messages fixture so tests work.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 5758e2b2a..26555aaa0 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -49,7 +49,7 @@ end
describe RequestController, "when showing one request" do
integrate_views
- fixtures :info_requests, :public_bodies, :users, :incoming_messages # all needed as integrating views
+ fixtures :info_requests, :public_bodies, :users, :incoming_messages, :outgoing_messages # all needed as integrating views
it "should be successful" do
get :show, :id => 101
@@ -67,10 +67,14 @@ describe RequestController, "when showing one request" do
end
it "should show incoming messages" do
+ get :show, :id => 101
+ size_before = assigns[:correspondences].size
+
ir = info_requests(:fancy_dog_request)
receive_incoming_mail('incoming-request-plain.email', ir.incoming_email)
+
get :show, :id => 101
- assigns[:correspondences].size.should == 2
+ (assigns[:correspondences].size - size_before).should == 1
end
end