From 0735585de2d037e3b7495d701f2f2e199f483889 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 12 Mar 2013 09:35:47 -0700 Subject: Turn off transactional fixtures and fully destroy the message we import in order to cleanup the data created by this test. --- spec/script/mailin_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spec/script/mailin_spec.rb') diff --git a/spec/script/mailin_spec.rb b/spec/script/mailin_spec.rb index ac04dcfcf..acd06ff3b 100644 --- a/spec/script/mailin_spec.rb +++ b/spec/script/mailin_spec.rb @@ -16,10 +16,22 @@ end describe "When importing mail into the application" do + # Turn off transactional fixtures for this suite - incoming message is imported + # outside the transaction via ExternalCommand, so needs to be destroyed outside the + # transaction + self.use_transactional_fixtures = false + it "should not produce any output and should return a 0 code on importing a plain email" do r = mailin_test("incoming-request-empty.email") r.status.should == 0 r.out.should == "" end + # Destroy the incoming message so that it doesn't affect other tests + after do + ir = info_requests(:other_request) + incoming_message = ir.incoming_messages[0] + incoming_message.fully_destroy + end + end -- cgit v1.2.3