e16cc21b0a
- Adds a button in Account Settings where you can request a ZIP export of your Fizzy data - Export files are created in the background. When ready, a link to download them is sent to the requester. - Exports expire after 24 hours. And are limited to 10 per day.
17 lines
464 B
Ruby
17 lines
464 B
Ruby
require "test_helper"
|
|
|
|
class ExportMailerTest < ActionMailer::TestCase
|
|
test "completed" do
|
|
export = Account::Export.create!(account: Current.account, user: users(:david))
|
|
email = ExportMailer.completed(export)
|
|
|
|
assert_emails 1 do
|
|
email.deliver_now
|
|
end
|
|
|
|
assert_equal [ "david@37signals.com" ], email.to
|
|
assert_equal "Your Fizzy export is ready", email.subject
|
|
assert_match %r{/exports/#{export.id}}, email.body.encoded
|
|
end
|
|
end
|