test/graph_queries_test.rb in redgraph-0.2.2 vs test/graph_queries_test.rb in redgraph-0.2.3

- old
+ new

@@ -40,6 +40,17 @@ def test_query_node_and_edge edge = quick_add_edge(type: 'FRIEND_OF', src: @al, dest: @john, properties: {since: 1980}) result = @graph.query("MATCH (src)-[edge:FRIEND_OF]->(dest) RETURN src, edge") assert_equal([[@al, edge]], result) end + + def test_query_notifications + payload = nil + subscription = ActiveSupport::Notifications.subscribe Redgraph::NOTIFICATIONS_KEY do |name, start, finish, id, _payload| + payload = _payload + end + + query = "MATCH (n) RETURN n.name ORDER BY n.name" + result = @graph.query(query) + assert_includes(payload[:query], query) + end end