Fix rubocop offenses

This commit is contained in:
Andreas Nedbal 2022-11-06 15:23:05 +01:00
parent 3f6e61e39b
commit 5f97b87f3c
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddInboxLockedToUsers < ActiveRecord::Migration[6.1]
def up
add_column :users, :privacy_lock_inbox, :boolean, default: false

View File

@ -6,7 +6,7 @@ describe QuestionWorker do
describe "#perform" do
let(:user) { FactoryBot.create(:user) }
let(:user_id) { user.id }
let(:question) { FactoryBot.create(:question, user: user) }
let(:question) { FactoryBot.create(:question, user:) }
let(:question_id) { question.id }
before do
@ -21,7 +21,7 @@ describe QuestionWorker do
it "places the question in the inbox of the user's followers" do
expect { subject }
.to(
change { Inbox.where(user_id: user.followers.ids, question_id: question_id, new: true).count }
change { Inbox.where(user_id: user.followers.ids, question_id:, new: true).count }
.from(0)
.to(5)
)
@ -35,7 +35,7 @@ describe QuestionWorker do
expect { subject }
.to(
change { Inbox.where(user_id: user.followers.ids, question_id: question_id, new: true).count }
change { Inbox.where(user_id: user.followers.ids, question_id:, new: true).count }
.from(0)
.to(4)
)
@ -46,7 +46,7 @@ describe QuestionWorker do
expect { subject }
.to(
change { Inbox.where(user_id: user.followers.ids, question_id: question_id, new: true).count }
change { Inbox.where(user_id: user.followers.ids, question_id:, new: true).count }
.from(0)
.to(4)
)