Sha256: 61e5cb702eab7d5d554b6224177822b604c8fa915a51fac5321a165e4197f9f3
Contents?: true
Size: 810 Bytes
Versions: 62
Compression:
Stored size: 810 Bytes
Contents
require 'test_helper' module Workarea module Admin class ImportsHelperTest < ViewTest class Foo include ApplicationDocument field :foo, type: String embeds_many :bars validates :foo, presence: true, inclusion: { in: %(baz qux) } end class Bar include ApplicationDocument field :bar, type: String embedded_in :foo validates :bar, uniqueness: true end def test_rendering_validations results = render_validations_for(Foo) assert_includes(results, 'presence') assert_includes(results, 'foo') assert_includes(results, 'baz') assert_includes(results, 'qux') assert_includes(results, 'bar') assert_includes(results, 'uniqueness') end end end end
Version data entries
62 entries across 62 versions & 1 rubygems