Skip to content

Commit c577c2f

Browse files
committed
test that fails
1 parent 3c1242a commit c577c2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/tag_examples.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ def nuke_db
9797
tag_class.leaves.should be_empty
9898
DestroyedTag.all.map { |t| t.name }.should =~ %w{root mid leaf}
9999
end
100+
101+
it 'fix self_and_ancestors properly on reparenting' do
102+
t = tag_class.create! :name => 'fng'
103+
t.self_and_ancestors.to_a.should == [t]
104+
@leaf.children << t
105+
t.self_and_ancestors.to_a.should == [t, @leaf, @mid, @root]
106+
end
100107
end
101108

102109
context "3 tag explicit_create db" do

0 commit comments

Comments
 (0)