aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-06 17:20:32 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-06 17:20:32 +0000
commitddd86f6f41c740748f8a867022a89179c587ca30 (patch)
tree7ee2982cf92b40e8527704ec1f7573cc99ae31ea /spec/controllers/request_controller_spec.rb
parent38e30c682504e8cd5ace61f2fc937d100eae3c65 (diff)
parent766d696d5b914520b0b9367e9b9a9decab87ea5f (diff)
Merge branch 'release/0.5' into wdtk
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 4994c2a8f..f25ebe339 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -287,7 +287,7 @@ describe RequestController, "when showing one request" do
old_path = assigns[:url_path]
response.location.should have_text(/#{assigns[:url_path]}$/)
zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", old_path)) { |zipfile|
- zipfile.count.should == 2
+ zipfile.count.should == 1 # just the message
}
receive_incoming_mail('incoming-request-two-same-name.email', ir.incoming_email)
get :download_entire_request, :url_title => title
@@ -295,14 +295,14 @@ describe RequestController, "when showing one request" do
old_path = assigns[:url_path]
response.location.should have_text(/#{assigns[:url_path]}$/)
zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", old_path)) { |zipfile|
- zipfile.count.should == 2
+ zipfile.count.should == 3 # the message plus two "hello.txt" files
}
receive_incoming_mail('incoming-request-attachment-unknown-extension.email', ir.incoming_email)
get :download_entire_request, :url_title => title
assigns[:url_path].should have_text(/#{title}.zip$/)
response.location.should have_text(/#{assigns[:url_path]}/)
zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", assigns[:url_path])) { |zipfile|
- zipfile.count.should == 4
+ zipfile.count.should == 5 # the message, two hello.txt, the unknown attachment, and its empty message
}
assigns[:url_path].should_not == old_path
end