Sha256: 357c7ad88cf3629bb53caf63cf2ebbe64f16d4ab32fc0825fc98915cdda864af

Contents?: true

Size: 617 Bytes

Versions: 6

Compression:

Stored size: 617 Bytes

Contents

require 'test_helper'
require 'workarea/blog/import/wordpress/attachment'

module Workarea
  module Blog
    module Import
      module Wordpress
        class AttachmentTest < TestCase
          def test_creates_a_new_asset_from_url
            url = 'https://testingwordpressexports.files.wordpress.com/2018/11/person-smartphone-office-table.jpeg'

            asset = Workarea::Blog::Import::Wordpress::Attachment.new(url).save
            assert_equal('-2018-11-person-smartphone-office-table', asset.name)
            assert_equal(['Wordpress'], asset.tags)
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-blog-3.5.2 test/lib/workarea/blog/import/wordpress/attachment_test.rb
workarea-blog-3.5.1 test/lib/workarea/blog/import/wordpress/attachment_test.rb
workarea-blog-3.5.0 test/lib/workarea/blog/import/wordpress/attachment_test.rb
workarea-blog-3.4.9 test/lib/workarea/blog/import/wordpress/attachment_test.rb
workarea-blog-3.4.8 test/lib/workarea/blog/import/wordpress/attachment_test.rb
workarea-blog-3.4.7 test/lib/workarea/blog/import/wordpress/attachment_test.rb