Sha256: e2dacaecb3e37fc320a812db76eb9c24a099dba28daa9e205394731000ff03f6

Contents?: true

Size: 1.1 KB

Versions: 14

Compression:

Stored size: 1.1 KB

Contents

require 'test_helper'
require File.dirname(File.expand_path(__FILE__))+'/test_helper'

class PortletsTest < Caterpillar::TestCase # :nodoc:

#   def test_get
#     @portlets.each do |portlet|
#       next if portlet[:reqs].empty?
#       @controller = portlet[:reqs][:controller]
#       action = portlet[:reqs][:action]
#       get action
#     end
#   end

  def test_name
    @portlets.each do |portlet|
      assert_not_nil portlet[:name], '%s has no name' % portlet
    end
  end

  def test_path
    @portlets.each do |portlet|
      assert_not_nil portlet[:path], '%s has no path' % portlet[:name]
    end
  end

  def test_reqs
    @portlets.each do |portlet|
      assert_not_nil portlet[:reqs], '%s has no reqs' % portlet[:name]
    end
  end

  def test_vars
    valid_variables = [:uid,:gid] # the rails-portlet can handle these
    @portlets.each do |portlet|
      assert_not_nil portlet[:vars], '%s has no vars' % portlet[:name]
      portlet[:vars].each do |var|
        assert valid_variables.include?(var), '%s is not supported by Rails-portlet, file a feature request' % var
      end
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
caterpillar-1.0.7 test/portlets_test.rb
caterpillar-1.0.6 test/portlets_test.rb
caterpillar-1.0.5 test/portlets_test.rb
caterpillar-1.0.0 test/portlets_test.rb
caterpillar-1.0.1 test/portlets_test.rb
caterpillar-0.9.15 test/portlets_test.rb
caterpillar-0.9.16 test/portlets_test.rb
caterpillar-0.9.4 test/portlets_test.rb
caterpillar-0.9.6 test/portlets_test.rb
caterpillar-0.9.0 test/portlets_test.rb
caterpillar-0.9.2 test/portlets_test.rb
caterpillar-0.9.5 test/portlets_test.rb
caterpillar-0.9.8 test/portlets_test.rb
caterpillar-0.9.1 test/portlets_test.rb