More lint fixes

This commit is contained in:
Andreas Nedbal 2022-06-26 03:17:48 +02:00 committed by Karina Kwiatek
parent 417eee2ddc
commit 54c89d7247
3 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Settings::ThemeController < ApplicationController
include ThemeHelper

View File

@ -1,5 +1,5 @@
class UserController < ApplicationController
before_action :authenticate_user!, only: %w(edit update edit_privacy update_privacy data export begin_export edit_security update_2fa destroy_2fa reset_user_recovery_codes edit_mute)
before_action :authenticate_user!, only: %w[edit update edit_privacy update_privacy data export begin_export edit_security update_2fa destroy_2fa reset_user_recovery_codes edit_mute]
def show
@user = User.where('LOWER(screen_name) = ?', params[:username].downcase).includes(:profile).first!

View File

@ -56,7 +56,7 @@ describe Settings::ThemeController, type: :controller do
context "user has no theme" do
it "creates a new theme" do
expect { subject }.to change { user.reload.theme }
expect { subject }.to(change{ user.reload.theme })
end
it "renders the edit template" do
@ -70,7 +70,7 @@ describe Settings::ThemeController, type: :controller do
let(:theme) { FactoryBot.create(:theme, user: user) }
it "updates the theme" do
expect { subject }.to change { theme.reload.attributes }
expect { subject }.to(change{ theme.reload.attributes })
end
it "renders the edit template" do