mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
Appease the robot canine
This commit is contained in:
parent
136eac8bdd
commit
92a5095c00
3 changed files with 5 additions and 3 deletions
|
@ -11,7 +11,7 @@ class Ajax::AnonymousBlockController < AjaxController
|
|||
AnonymousBlock.create!(
|
||||
user: params[:global] ? nil : current_user,
|
||||
identifier: question.author_identifier,
|
||||
question:,
|
||||
question:
|
||||
)
|
||||
|
||||
question.inboxes.first.destroy
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Moderation::AnonymousBlockController < ApplicationController
|
||||
def index
|
||||
@anonymous_blocks = AnonymousBlock.where(user: nil)
|
||||
|
|
|
@ -15,7 +15,7 @@ describe Ajax::AnonymousBlockController, :ajax_controller, type: :controller do
|
|||
|
||||
context "when all required parameters are given" do
|
||||
let(:question) { FactoryBot.create(:question, author_identifier: "someidentifier") }
|
||||
let!(:inbox) { FactoryBot.create(:inbox, user: user, question: question) }
|
||||
let!(:inbox) { FactoryBot.create(:inbox, user:, question:) }
|
||||
let(:params) do
|
||||
{ question: question.id }
|
||||
end
|
||||
|
@ -37,7 +37,7 @@ describe Ajax::AnonymousBlockController, :ajax_controller, type: :controller do
|
|||
|
||||
context "when blocking a user globally" do
|
||||
let(:question) { FactoryBot.create(:question, author_identifier: "someidentifier") }
|
||||
let!(:inbox) { FactoryBot.create(:inbox, user: user, question: question) }
|
||||
let!(:inbox) { FactoryBot.create(:inbox, user:, question:) }
|
||||
let(:params) do
|
||||
{ question: question.id, global: "true" }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue