Sha256: 507e49f6fbb5e78e83d02280103f0d711a55ea317de5599460e8dcc49d06c1dc

Contents?: true

Size: 769 Bytes

Versions: 7

Compression:

Stored size: 769 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class PartialTest < ActionDispatch::IntegrationTest
  setup do
    Author.create! name: 'aamine'
    nari = Author.create! name: 'nari'
    nari.books.create! title: 'the gc book'
  end

  test 'decorating implicit @object' do
    visit '/authors'
    assert page.has_content? 'the gc book'
    assert page.has_content? 'the gc book'.reverse
  end

  test 'decorating implicit @collection' do
    visit '/authors?partial=collection'
    assert page.has_content? 'the gc book'
    assert page.has_content? 'the gc book'.reverse
  end

  test 'decorating objects in @locals' do
    visit '/authors?partial=locals'
    assert page.has_content? 'the gc book'
    assert page.has_content? 'the gc book'.upcase
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active_decorator-1.3.3 test/features/partial_test.rb
active_decorator-1.3.2 test/features/partial_test.rb
active_decorator-1.3.1 test/features/partial_test.rb
active_decorator-1.3.0 test/features/partial_test.rb
active_decorator-1.2.0 test/features/partial_test.rb
active_decorator-1.1.1 test/features/partial_test.rb
active_decorator-1.1.0 test/features/partial_test.rb