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

Version Path
workarea-admin-3.5.27 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.26 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.45 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.25 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.23 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.44 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.22 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.43 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.21 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.42 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.20 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.41 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.19 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.40 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.18 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.39 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.17 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.38 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.16 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.37 test/helpers/workarea/admin/imports_helper_test.rb