fix test
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user