ref: master
test/unit/translatable_content_test.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
require_relative "../test_helper" class TranslatableContentTest < ActiveSupport::TestCase class Content attr_accessor :parent, :profile include TranslatableContent end def setup @content = Content.new end attr_reader :content should 'be translatable if no parent' do assert content.translatable? end should 'not be translatable if parent is a forum' do content.parent = Forum.new refute content.translatable? end should 'be translatable if parent is not a forum' do content.parent = Blog.new assert content.translatable? end end |