summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-01-31 16:00:05 +0100
committerhukl <hukl@eight.local>2009-01-31 16:00:05 +0100
commit482448d05686b6aaa549208dafa36d682b3059b6 (patch)
treed2c7cd8c5539506600667c56e74602bc54b85edc /test
parent5b06d137fc6143ff679d1ce6048c4149ca23f4e2 (diff)
made sure that returned pages are always ordered
by there revision
Diffstat (limited to 'test')
-rw-r--r--test/unit/node_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb
index 14fdad0..2b35403 100644
--- a/test/unit/node_test.rb
+++ b/test/unit/node_test.rb
@@ -27,6 +27,16 @@ class NodeTest < ActiveSupport::TestCase
27 27
28 end 28 end
29 29
30 def test_order_of_pages_by_revision
31 one = @first_child.pages.create :title => "one"
32 two = @first_child.pages.create :title => "two"
33 three = @first_child.pages.create :title => "three"
34
35 @first_child.pages.reload
36
37 assert_equal [1,2,3], @first_child.pages.map { |x| x.revision }
38 end
39
30 def test_behavior_of_acts_as_list 40 def test_behavior_of_acts_as_list
31 one = @first_child.pages.create :title => "one" 41 one = @first_child.pages.create :title => "one"
32 two = @first_child.pages.create :title => "two" 42 two = @first_child.pages.create :title => "two"