test/graph_test.rb in redgraph-0.1.1 vs test/graph_test.rb in redgraph-0.1.2

- old
+ new

@@ -40,9 +40,22 @@ @graph.add_node(node) assert_equal(["name", "age"], @graph.properties) end + def test_relationship_types + @graph = create_sample_graph("foobar") + + actor = Redgraph::Node.new(label: "actor", properties: {"name": "Harrison Ford"}) + @graph.add_node(actor) + film = Redgraph::Node.new(label: "film", properties: {"name": "Star Wars"}) + @graph.add_node(film) + edge = Redgraph::Edge.new(type: "ACTED_IN", src: actor, dest: film) + @graph.add_edge(edge) + + assert_equal(["ACTED_IN"], @graph.relationship_types) + end + private def create_sample_graph(name) graph = Redgraph::Graph.new(name, url: $REDIS_URL) graph.connection.call(