This commit is contained in:
r888888888
2015-02-09 19:10:47 -08:00
parent ebe0c2e019
commit c8541baf6b
2 changed files with 5 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ module Danbooru
class Configuration class Configuration
# The version of this Danbooru. # The version of this Danbooru.
def version def version
"2.71.0" "2.72.0"
end end
# The name of this Danbooru. # The name of this Danbooru.

View File

@@ -91,11 +91,9 @@ class ForumTopicTest < ActiveSupport::TestCase
context "#mark_as_read!" do context "#mark_as_read!" do
context "without a previous visit" do context "without a previous visit" do
should "create a new visit" do should "create a new visit" do
assert_difference("ForumTopicVisit.count", 1) do @topic.mark_as_read!(@user)
@topic.mark_as_read!(@user)
end
@user.reload @user.reload
assert_equal(@topic.updated_at, ForumTopicVisit.last.last_read_at) assert_equal(@topic.updated_at.to_i, @user.last_forum_read_at.to_i)
end end
end end
@@ -105,11 +103,9 @@ class ForumTopicTest < ActiveSupport::TestCase
end end
should "update the visit" do should "update the visit" do
assert_difference("ForumTopicVisit.count", 0) do @topic.mark_as_read!(@user)
@topic.mark_as_read!(@user)
end
@user.reload @user.reload
assert_equal(@topic.updated_at, ForumTopicVisit.last.last_read_at) assert_equal(@topic.updated_at.to_i, @user.last_forum_read_at.to_i)
end end
end end
end end