test/facets/test_facet_container.rb in reality-facets-1.0.0 vs test/facets/test_facet_container.rb in reality-facets-1.1.0
- old
+ new
@@ -59,6 +59,18 @@
assert_raise_message('Attempting to redefine facet gwt') { TestFacetContainer.facet(:gwt) }
assert_raise_message("Unknown definition form '{:x=>:y, :z=>1}'") { TestFacetContainer.facet(:x => :y, :z => 1) }
end
+
+ def test_dependent_facets
+ TestFacetContainer.facet(:gwt)
+ TestFacetContainer.facet(:gwt_rpc => [:gwt])
+ TestFacetContainer.facet(:imit => [:gwt_rpc, :jpa])
+ TestFacetContainer.facet(:ee)
+ TestFacetContainer.facet(:jpa => [:ee])
+
+ assert_equal [:gwt], TestFacetContainer.dependent_facets(:gwt)
+ assert_equal [:imit, :jpa, :ee, :gwt_rpc, :gwt].sort, TestFacetContainer.dependent_facets(:imit).sort
+ assert_equal [:jpa, :ee].sort, TestFacetContainer.dependent_facets(:jpa).sort
+ end
end