bug: resolve false positive "oops" redirect

This commit is contained in:
Mark Moser
2017-04-18 10:39:49 -05:00
parent 76e7401cec
commit 49035929fb
3 changed files with 31 additions and 0 deletions

View File

@ -34,4 +34,23 @@ class CandidateTest < ActiveSupport::TestCase
candidate.build_reviews
assert_equal 3, candidate.votes.count
end
test 'can get last answer timestamp' do
candidate = candidates(:roy)
roy_last = answers(:roy2).updated_at
assert_equal roy_last, candidate.last_answered_at
end
test 'gillian is stale with no answers' do
candidate = candidates(:gillian)
assert candidate.stale?
end
test 'roy is stale with answers' do
candidate = candidates(:roy)
assert candidate.stale?
end
end