Fix lints
This commit is contained in:
parent
d9991f5fa7
commit
1c4993df3f
|
@ -7,7 +7,6 @@ class AnonymousBlockController < ApplicationController
|
||||||
params.require :question
|
params.require :question
|
||||||
|
|
||||||
question = Question.find(params[:question])
|
question = Question.find(params[:question])
|
||||||
|
|
||||||
authorize AnonymousBlock, :create_global? if params[:global]
|
authorize AnonymousBlock, :create_global? if params[:global]
|
||||||
|
|
||||||
AnonymousBlock.create!(
|
AnonymousBlock.create!(
|
||||||
|
|
|
@ -4,7 +4,7 @@ require "rails_helper"
|
||||||
|
|
||||||
describe AnonymousBlockController, type: :controller do
|
describe AnonymousBlockController, type: :controller do
|
||||||
describe "#create" do
|
describe "#create" do
|
||||||
subject { post(:create, params: params) }
|
subject { post(:create, params:) }
|
||||||
|
|
||||||
context "user signed in" do
|
context "user signed in" do
|
||||||
let(:user) { FactoryBot.create(:user) }
|
let(:user) { FactoryBot.create(:user) }
|
||||||
|
@ -53,7 +53,7 @@ describe AnonymousBlockController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#destroy" do
|
describe "#destroy" do
|
||||||
subject { delete(:destroy, params: params) }
|
subject { delete(:destroy, params:) }
|
||||||
|
|
||||||
context "user signed in" do
|
context "user signed in" do
|
||||||
let(:user) { FactoryBot.create(:user) }
|
let(:user) { FactoryBot.create(:user) }
|
||||||
|
@ -64,7 +64,7 @@ describe AnonymousBlockController, type: :controller do
|
||||||
|
|
||||||
context "when all parameters are given" do
|
context "when all parameters are given" do
|
||||||
let(:question) { FactoryBot.create(:question, author_identifier: "someidentifier") }
|
let(:question) { FactoryBot.create(:question, author_identifier: "someidentifier") }
|
||||||
let(:block) { AnonymousBlock.create(user: user, identifier: "someidentifier", question: question) }
|
let(:block) { AnonymousBlock.create(user:, identifier: "someidentifier", question:) }
|
||||||
let(:params) do
|
let(:params) do
|
||||||
{ id: block.id }
|
{ id: block.id }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue