mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: Rename Reset Read bulk action to Defer (#15972)
It is enabled only if defer is enabled in user options too and if the button shows up in the topic's footer.
This commit is contained in:
@ -176,7 +176,7 @@ describe PostTiming do
|
||||
end
|
||||
|
||||
it '#destroy_last_for decrements the reads count for a post' do
|
||||
PostTiming.destroy_last_for(post.user, post.topic_id)
|
||||
PostTiming.destroy_last_for(post.user, topic_id: post.topic_id)
|
||||
|
||||
expect(post.reload.reads).to eq initial_read_count
|
||||
end
|
||||
@ -193,7 +193,7 @@ describe PostTiming do
|
||||
post.topic.update!(updated_at: 10.minutes.ago)
|
||||
PostTiming.process_timings(post.user, post.topic_id, 1, [[post.post_number, 100]])
|
||||
|
||||
PostTiming.destroy_last_for(post.user, post.topic_id)
|
||||
PostTiming.destroy_last_for(post.user, topic_id: post.topic_id)
|
||||
|
||||
expect(post.user.user_stat.reload.first_unread_at).to eq_time(post.topic.updated_at)
|
||||
end
|
||||
@ -203,7 +203,7 @@ describe PostTiming do
|
||||
post.topic.update!(updated_at: 10.minutes.ago)
|
||||
PostTiming.process_timings(post.user, post.topic_id, 1, [[post.post_number, 100]])
|
||||
|
||||
PostTiming.destroy_last_for(post.user, post.topic_id)
|
||||
PostTiming.destroy_last_for(post.user, topic_id: post.topic_id)
|
||||
|
||||
expect(post.user.user_stat.reload.first_unread_pm_at).to eq_time(post.topic.updated_at)
|
||||
end
|
||||
@ -217,7 +217,7 @@ describe PostTiming do
|
||||
topic.allowed_groups << group
|
||||
PostTiming.process_timings(user, topic.id, 1, [[post.post_number, 100]])
|
||||
|
||||
PostTiming.destroy_last_for(user, topic.id)
|
||||
PostTiming.destroy_last_for(user, topic_id: topic.id)
|
||||
|
||||
expect(GroupUser.find_by(user: user, group: group).first_unread_pm_at)
|
||||
.to eq_time(post.topic.updated_at)
|
||||
|
Reference in New Issue
Block a user