fix specs
This commit is contained in:
@@ -125,7 +125,7 @@ class ForumPost < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def undelete!
|
def undelete!
|
||||||
update_attribute(:is_deleted, true)
|
update_attribute(:is_deleted, false)
|
||||||
update_topic_updated_at_on_create
|
update_topic_updated_at_on_create
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class ForumTopicTest < ActiveSupport::TestCase
|
|||||||
should "prune the string if it gets too long" do
|
should "prune the string if it gets too long" do
|
||||||
array = (1..1_000).to_a.map(&:to_s).in_groups_of(2)
|
array = (1..1_000).to_a.map(&:to_s).in_groups_of(2)
|
||||||
result = @topic.mark_as_read(array)
|
result = @topic.mark_as_read(array)
|
||||||
assert_equal("502 503", result[0..6])
|
assert_equal(2009, result.size)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user