diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-03-12 09:35:47 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-03-12 09:35:47 -0700 |
commit | 0735585de2d037e3b7495d701f2f2e199f483889 (patch) | |
tree | af100cc7c4128f227d47070e29c4b3dc1e5922d0 /spec/script/mailin_spec.rb | |
parent | 72357e351d9dbe312f978bc1e2ab0630ed4df03d (diff) |
Turn off transactional fixtures and fully destroy the message we import in order to cleanup the data created by this test.
Diffstat (limited to 'spec/script/mailin_spec.rb')
-rw-r--r-- | spec/script/mailin_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |