diff options
| author | James Turnbull <james@lovedthanlost.net> | 2008-02-14 08:11:41 +1100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-02-14 08:11:41 +1100 |
| commit | 9f224f2327ca691f4263e36708ef4e7386b2c4b4 (patch) | |
| tree | b4d2302a9e36ce9f0a8944c3eabd0ee1c4c29cf9 /spec | |
| parent | 8cfe4e7a984eb92afd92fa1128d2fa8c1a021976 (diff) | |
| parent | a42c3ae7eba819053d8f01a339a9c865092d15e2 (diff) | |
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'spec')
| -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 |
