aboutsummaryrefslogtreecommitdiffstats
path: root/spec/script/mailin_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-02-14 18:56:16 +0000
committerLouise Crow <louise.crow@gmail.com>2013-02-14 19:03:40 +0000
commitbc0cc811e80143d0255d86433a80a823d1141dd0 (patch)
tree0c5005b2b03e540d8ab562da06539414709fbc18 /spec/script/mailin_spec.rb
parent6fa9c17c7cd5551489a77f6e89543b7886be51d4 (diff)
parent2c5749d4d92e6601856cef6f7e2201d06d885183 (diff)
Merge branch 'release/0.7'0.7.00.7
Diffstat (limited to 'spec/script/mailin_spec.rb')
-rw-r--r--spec/script/mailin_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/script/mailin_spec.rb b/spec/script/mailin_spec.rb
new file mode 100644
index 000000000..d80789635
--- /dev/null
+++ b/spec/script/mailin_spec.rb
@@ -0,0 +1,21 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require "external_command"
+
+def mailin_test(email_filename)
+ Dir.chdir Rails.root do
+ xc = ExternalCommand.new("script/mailin")
+ xc.run(load_file_fixture(email_filename))
+ xc.err.should == ""
+ return xc
+ end
+end
+
+describe "When importing mail into the application" do
+
+ it "should not produce any output and should return a 0 code on importing a plain email" do
+ r = mailin_test("incoming-request-plain.email")
+ r.status.should == 0
+ r.out.should == ""
+ end
+
+end \ No newline at end of file