wip
This commit is contained in:
1 parent
f8c03d6f5c
commit
692446b97b
25 files changed
+283
-13
No files matched your search
@@ -0,0 +1,18 @@
|
||||
require 'test_helper'
|
||||
|
||||
class PageTest < ActiveSupport::TestCase
|
||||
def test_pages
|
||||
pages = Page.all
|
||||
|
||||
assert pages.count > 10, "Fixture did not load"
|
||||
end
|
||||
|
||||
def test_last_10_order
|
||||
pages = Page.last_ten
|
||||
times = pages.map(&:updated_at)
|
||||
|
||||
assert_equal 10, times.count
|
||||
assert_equal times.sort.reverse, times
|
||||
assert times.last < times.first, 'Sort order should be descending'
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user