test/unit/diagram_test.rb in rails-erd-1.4.1 vs test/unit/diagram_test.rb in rails-erd-1.4.2
- old
+ new
@@ -147,9 +147,16 @@
create_model "Author"
create_model "Editor"
assert_equal [Author, Editor], retrieve_entities(:only => [:Author, :Editor]).map(&:model)
end
+ test "generate should include only specified entities (With the class names as strings)" do
+ create_model "Book"
+ create_model "Author"
+ create_model "Editor"
+ assert_equal [Author, Editor], retrieve_entities(:only => ['Author', 'Editor']).map(&:model)
+ end
+
test "generate should filter disconnected entities if disconnected is false" do
create_model "Book", :author => :references do
belongs_to :author
end
create_model "Author"