Sha256: 9856b61712fd26b0c6a82b5197b46e40498cded722834f1518beae9d6fa6a05a
Contents?: true
Size: 1.02 KB
Versions: 27
Compression:
Stored size: 1.02 KB
Contents
require 'test_helper' module Workarea module Admin class FacetsHelperTest < ViewTest def test_facet_value_display_name facet = Workarea::Search::Facet.new(nil, 'tags') assert_equal('bar_baz', facet_value_display_name(facet, 'bar_baz')) facet = Workarea::Search::Facet.new(nil, 'colors') assert_equal('Bar Baz', facet_value_display_name(facet, 'bar_baz')) facet = Workarea::Search::Facet.new(nil, 'upcoming_changes') release = create_release(name: 'Foo Release') assert_equal('Foo Release', facet_value_display_name(facet, release.id)) assert_nil(facet_value_display_name(facet, 'bar_baz')) facet = Workarea::Search::Facet.new(nil, 'active_by_segment') segment = create_segment(name: 'Foo Segment') assert_equal('Foo Segment', facet_value_display_name(facet, segment.id)) assert_equal( t('workarea.admin.segments.missing', id: 'bar'), facet_value_display_name(facet, 'bar') ) end end end end
Version data entries
27 entries across 27 versions & 1 rubygems