Sha256: 732eda23a5341ac7adc06f8cac33fc1cb5a8914254a54ff0a1d2388c922cbeb5
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
# # Testing OpenWFE # # John Mettraux at openwfe.org # # Thu Nov 1 19:33:45 JST 2007 # require 'test/unit' require 'openwfe/expressions/flowexpression' include OpenWFE class FeLookupAttTest < Test::Unit::TestCase #def setup #end #def teardown #end def test_0 attributes = { "a" => true, "b" => false, } fe = FlowExpression.new_exp nil, nil, nil, nil, attributes assert_equal true, fe.lookup_boolean_attribute("a", nil) assert_equal true, fe.lookup_boolean_attribute(:a, nil) assert_equal true, fe.lookup_boolean_attribute("a", nil, false) assert_equal true, fe.lookup_boolean_attribute(:a, nil, false) assert_equal true, fe.lookup_boolean_attribute("a", nil, true) assert_equal true, fe.lookup_boolean_attribute(:a, nil, true) assert_equal false, fe.lookup_boolean_attribute("b", nil) assert_equal false, fe.lookup_boolean_attribute(:b, nil) assert_equal false, fe.lookup_boolean_attribute("b", nil, false) assert_equal false, fe.lookup_boolean_attribute(:b, nil, false) assert_equal false, fe.lookup_boolean_attribute("b", nil, true) assert_equal false, fe.lookup_boolean_attribute(:b, nil, true) # a fat but fast test end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
openwferu-0.9.17 | test/fe_lookup_att_test.rb |