Sha256: 83bf2f34731d4e4081ad540ce1d7e80f88a8b3a2230612464b28120842bfb69a
Contents?: true
Size: 703 Bytes
Versions: 62
Compression:
Stored size: 703 Bytes
Contents
require 'test_helper' require 'browse_page_validator' class BrowsePageValidatorTest < ActiveSupport::TestCase class Record include Mongoid::Document field :browse_pages, type: Array validates_with BrowsePageValidator end should "allow tagging to a variety of unique browse pages" do record = Record.new( browse_pages: [ 'business/tax', 'housing/safety-environment' ] ) assert record.valid? end should "be invalid if there's duplicates in the browse page list" do record = Record.new( browse_pages: [ 'housing/safety-environment', 'housing/safety-environment' ] ) refute record.valid? end end
Version data entries
62 entries across 62 versions & 1 rubygems