DEV: Don’t use change { … }.by(0) in specs

This commit is contained in:
Loïc Guitaut
2022-07-19 16:03:03 +02:00
committed by Loïc Guitaut
parent 3bfc254c4e
commit 91b6b5eee7
44 changed files with 138 additions and 136 deletions

View File

@ -49,7 +49,7 @@ describe TopicsBulkAction do
Fabricate(:topic_user, user: user, topic: topic3, last_read_post_number: 1)
expect do
TopicsBulkAction.new(user, [Topic.all.pluck(:id)], type: "dismiss_topics").perform!
end.to change { DismissedTopicUser.count }.by(0)
end.not_to change { DismissedTopicUser.count }
end
it 'dismisses when topic user without last_read_post_number' do