remove errors

This commit is contained in:
Georg Gadinger 2022-12-29 07:26:40 +01:00 committed by Andreas Nedbal
parent 9413d23a02
commit fb07eda972
16 changed files with 3 additions and 27 deletions

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'errors'
class Ajax::ModerationController < AjaxController
def destroy_report
params.require :id

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
class Ajax::QuestionController < AjaxController
def destroy
params.require :question

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
class Ajax::RelationshipController < AjaxController
before_action :authenticate_user!

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
class User
module Relationship
module Block

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
class User
module Relationship
module Follow

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Errors
class Base < StandardError
def status
@ -5,7 +7,7 @@ module Errors
end
def code
@code ||= self.class.name.sub('Errors::', '').underscore
@code ||= self.class.name.sub("Errors::", "").underscore
end
def locale_code

View File

@ -2,7 +2,6 @@
require "dry-initializer"
require "types"
require "errors"
module UseCase
class Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
module UseCase
module Question
class Create < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
module UseCase
module Question
class Destroy < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
module UseCase
module Relationship
class Create < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "errors"
module UseCase
module Relationship
class Destroy < UseCase::Base

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true
require "rails_helper"
require "errors"
describe UseCase::Question::CreateFollowers do
subject do

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true
require "rails_helper"
require "errors"
describe UseCase::Question::Create do
subject do

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true
require "rails_helper"
require "errors"
describe UseCase::Question::Destroy do
subject do

View File

@ -2,8 +2,6 @@
require "rails_helper"
require "errors"
describe UseCase::Relationship::Create do
shared_examples_for "valid relationship type" do
context "target_user is source_user" do

View File

@ -2,8 +2,6 @@
require "rails_helper"
require "errors"
describe UseCase::Relationship::Destroy do
shared_examples_for "valid relationship type" do
its([:status]) { is_expected.to eq(204) }