Sha256: 642816bcc50320321d209f2e9e8d13cf7789a7bf6251e674b500b7623706ae2f

Contents?: true

Size: 752 Bytes

Versions: 1

Compression:

Stored size: 752 Bytes

Contents

require 'test_helper'

class SetMetaTest < ActionView::TestCase

  test "should populate meta using the path of the template as key" do
    render template: 'pages/index', layout: 'layouts/application'
    assert_select 'title', I18n.t('pages.index.meta.title')
    assert_select "meta[content='#{I18n.t('pages.index.meta.description')}']"
    assert_select "meta[content='#{I18n.t('pages.index.meta.keywords')}']"
 
    render template: 'pages/other', layout: 'layouts/application'
    assert_select 'title', I18n.t('pages.other.meta.title', name: 'other')
    assert_select "meta[content='#{I18n.t('pages.other.meta.description', name: 'other')}']"
    assert_select "meta[content='#{I18n.t('pages.other.meta.keywords', name: 'other')}']"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tuning-0.1.3 test/set_meta_test.rb