Sha256: 236995dbaebd3cdfc079fe233dee6fff7fafe49d6d5fece60c28282ec2360872

Contents?: true

Size: 963 Bytes

Versions: 62

Compression:

Stored size: 963 Bytes

Contents

require 'test_helper'

module Workarea
  class GenerateContentMetadataTest < TestCase
    def test_perform
      home_page = Content.for('home_page')
      category = create_category(name: 'Test Category')
      page = create_page(name: 'Test Page')
      taxon = create_taxon(name: 'Test Category', navigable: category)
      create_taxon(parent: taxon, navigable: page)
      page_content = Content.for(page)
      page_content.blocks.create!(
        type: 'html',
        data: { 'html' => 'foo bar baz qux qoo'}
      )

      GenerateContentMetadata.new.perform

      category.reload
      assert(category.content.browser_title.present?)
      assert(category.content.meta_description.present?)

      page.reload
      assert(page.content.browser_title.present?)
      assert(page.content.meta_description.present?)

      home_page.reload
      assert(home_page.browser_title.present?)
      assert(home_page.meta_description.present?)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.15 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.36 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.14 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.35 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.13 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.34 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.12 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.33 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.11 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.10 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.32 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.9 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.31 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.8 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.30 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.7 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.29 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.6 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.4.28 test/workers/workarea/generate_content_metadata_test.rb
workarea-core-3.5.5 test/workers/workarea/generate_content_metadata_test.rb