aboutsummaryrefslogtreecommitdiffstats
path: root/spec/script/mailin-spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-01-15 16:05:25 +0000
committerLouise Crow <louise.crow@gmail.com>2013-01-15 16:05:25 +0000
commitd1cac849b5c74e4f0d35b193ad24eed1d6b66af6 (patch)
treecb153b82b3e1d451be2d299b6114c99b6610b173 /spec/script/mailin-spec.rb
parentf25df72186683e54dd10fd5aa94e1e26dff8ea92 (diff)
parent7cc8cae3a669fc5de91d6bc23812c265e8af4c93 (diff)
Merge branch 'release/0.6.9'
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