Fix lint nits
This commit is contained in:
parent
e222ab7c30
commit
54fb4d09fd
|
@ -11,7 +11,7 @@ class RelationshipsController < ApplicationController
|
|||
UseCase::Relationship::Create.call(
|
||||
source_user: current_user,
|
||||
target_user: ::User.find_by!(screen_name: params[:screen_name]),
|
||||
type: params[:type]
|
||||
type: params[:type],
|
||||
)
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -30,7 +30,7 @@ class RelationshipsController < ApplicationController
|
|||
UseCase::Relationship::Destroy.call(
|
||||
source_user: current_user,
|
||||
target_user: ::User.find_by!(screen_name: params[:screen_name]),
|
||||
type: params[:type]
|
||||
type: params[:type],
|
||||
)
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
- if type == "follow"
|
||||
= button_to relationships_path(screen_name:, type:), method: :delete, form: { id: "#{type}-#{screen_name}" }, class: "btn btn-primary", form_class: "d-grid" do
|
||||
= button_to relationships_path(screen_name:, type:), method: :delete, form: { id: "#{type}-#{screen_name}" }, class: "btn btn-primary",
|
||||
form_class: "d-grid" do
|
||||
= t("voc.unfollow")
|
||||
|
||||
- if type == "block"
|
||||
|
|
|
@ -41,9 +41,9 @@ describe RelationshipsController, type: :controller do
|
|||
|
||||
let(:type) { "Sauerkraut" }
|
||||
let(:screen_name) { user2.screen_name }
|
||||
let(:params) { { type: type, screen_name: screen_name } }
|
||||
let(:params) { { type:, screen_name: } }
|
||||
|
||||
subject { post(:create, params: params, format: :turbo_stream) }
|
||||
subject { post(:create, params:, format: :turbo_stream) }
|
||||
|
||||
it_behaves_like "requires login"
|
||||
|
||||
|
@ -116,9 +116,9 @@ describe RelationshipsController, type: :controller do
|
|||
|
||||
let(:type) { "Sauerkraut" }
|
||||
let(:screen_name) { user2.screen_name }
|
||||
let(:params) { { type: type, screen_name: screen_name } }
|
||||
let(:params) { { type:, screen_name: } }
|
||||
|
||||
subject { delete(:destroy, params: params, format: :turbo_stream) }
|
||||
subject { delete(:destroy, params:, format: :turbo_stream) }
|
||||
|
||||
it_behaves_like "requires login"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ RSpec.shared_examples_for "ajax does not succeed" do |part_of_error_message|
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples_for "turbo does not succeed" do |part_of_error_message|
|
||||
RSpec.shared_examples_for "turbo does not succeed" do
|
||||
it "turbo does not succeed" do
|
||||
subject
|
||||
# FIXME: for some reason, partials are not rendered, making the actual error message not accessible
|
||||
|
|
Loading…
Reference in New Issue