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.4.27 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.4 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.26 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.3 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.25 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.2 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.24 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.1 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.23 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.22 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.0 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.21 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.5.0.beta.1 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.20 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.19 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.18 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.17 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.16 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.15 test/helpers/workarea/admin/imports_helper_test.rb
workarea-admin-3.4.14 test/helpers/workarea/admin/imports_helper_test.rb