Fix rubocop offenses
This commit is contained in:
parent
3f6e61e39b
commit
5f97b87f3c
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddInboxLockedToUsers < ActiveRecord::Migration[6.1]
|
class AddInboxLockedToUsers < ActiveRecord::Migration[6.1]
|
||||||
def up
|
def up
|
||||||
add_column :users, :privacy_lock_inbox, :boolean, default: false
|
add_column :users, :privacy_lock_inbox, :boolean, default: false
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe QuestionWorker do
|
||||||
describe "#perform" do
|
describe "#perform" do
|
||||||
let(:user) { FactoryBot.create(:user) }
|
let(:user) { FactoryBot.create(:user) }
|
||||||
let(:user_id) { user.id }
|
let(:user_id) { user.id }
|
||||||
let(:question) { FactoryBot.create(:question, user: user) }
|
let(:question) { FactoryBot.create(:question, user:) }
|
||||||
let(:question_id) { question.id }
|
let(:question_id) { question.id }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -21,7 +21,7 @@ describe QuestionWorker do
|
||||||
it "places the question in the inbox of the user's followers" do
|
it "places the question in the inbox of the user's followers" do
|
||||||
expect { subject }
|
expect { subject }
|
||||||
.to(
|
.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)
|
.from(0)
|
||||||
.to(5)
|
.to(5)
|
||||||
)
|
)
|
||||||
|
@ -35,7 +35,7 @@ describe QuestionWorker do
|
||||||
|
|
||||||
expect { subject }
|
expect { subject }
|
||||||
.to(
|
.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)
|
.from(0)
|
||||||
.to(4)
|
.to(4)
|
||||||
)
|
)
|
||||||
|
@ -46,7 +46,7 @@ describe QuestionWorker do
|
||||||
|
|
||||||
expect { subject }
|
expect { subject }
|
||||||
.to(
|
.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)
|
.from(0)
|
||||||
.to(4)
|
.to(4)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue