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