diff options
Diffstat (limited to 'spec/unit/simple_graph.rb')
| -rwxr-xr-x | spec/unit/simple_graph.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/simple_graph.rb b/spec/unit/simple_graph.rb index c8fe14cf3..e1e42e40f 100755 --- a/spec/unit/simple_graph.rb +++ b/spec/unit/simple_graph.rb @@ -266,4 +266,15 @@ describe Puppet::SimpleGraph, " when sorting the graph" do add_edges :a => :b, :b => :e, :c => :a, :d => :c proc { @graph.topsort }.should_not raise_error end + + # Our graph's add_edge method is smart enough not to add + # duplicate edges, so we use the objects, which it doesn't + # check. + it "should be able to sort graphs with duplicate edges" do + one = Puppet::Relationship.new(:a, :b) + @graph.add_edge(one) + two = Puppet::Relationship.new(:a, :b) + @graph.add_edge(two) + proc { @graph.topsort }.should_not raise_error + end end |
