Sha256: 3e235889dfd999656770613cbcf1d3ac120edc3b4f5ebc368eccc68996a9598c

Contents?: true

Size: 534 Bytes

Versions: 41

Compression:

Stored size: 534 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class ContentHelperTest < ViewTest
      def test_options_for_category
        category = create_category
        deleted_category = create_category.tap(&:destroy)
        options = %(<option selected="selected" value="#{category.id}">#{category.name}</option>)

        assert_equal('', options_for_category(nil))
        assert_equal('', options_for_category(deleted_category.id))
        assert_equal(options, options_for_category(category.id))
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

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