sms-pager/test/models/page_test.rb
2015-09-20 13:26:45 -05:00

19 lines
407 B
Ruby

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