Sha256: 0d89ec0ac98fdcfece571b4f8de1a772f285a79ab84fa080bdf90d88a5cc73b0

Contents?: true

Size: 635 Bytes

Versions: 17

Compression:

Stored size: 635 Bytes

Contents

require 'test_helper'

class MailEngine::MailTemplateFileTest < ActiveSupport::TestCase
  context "Mail template file" do
    setup do
      @template = FactoryGirl.create(:dirzip_mail_template, :format => "html")
    end

    context "after updated" do
      setup do
        @template.mail_template_files.last.update_attributes :file => File.open(File.join(Rails.root, '../..', 'test', 'fixtures', 'files', 'image.png'))
      end

      should "update the file url in the mail template html" do
        @template.reload
        assert @template.body.include?(@template.mail_template_files.last.file.url)
      end
    end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mail_engine-0.1.15 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.14 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.13 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.12 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.11 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.10 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.9 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.8 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.7 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.6 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.5 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.4 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.3 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.2 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.1 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.1.0 test/unit/mail_engine/mail_template_file_test.rb
mail_engine-0.0.1 test/unit/mail_engine/mail_template_file_test.rb