-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename integration_error_detail model to error_detail
- Loading branch information
1 parent
8bce450
commit f02db0e
Showing
8 changed files
with
16 additions
and
17 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
app/models/integration_error_detail.rb → app/models/error_detail.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class IntegrationErrorDetail < ApplicationRecord | ||
class ErrorDetail < ApplicationRecord | ||
include Discard::Model | ||
self.discard_column = :deleted_at | ||
|
||
belongs_to :error_producer, polymorphic: true | ||
belongs_to :integration, polymorphic: true | ||
belongs_to :owner, polymorphic: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
spec/factories/integration_error_details.rb → spec/factories/error_details.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :integration_error_detail do | ||
factory :error_detail do | ||
association :owner, factory: %i[invoice].sample | ||
association :error_producer, factory: :anrok_integration | ||
association :integration, factory: :anrok_integration | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe ErrorDetail, type: :model do | ||
it { is_expected.to belong_to(:owner) } | ||
it { is_expected.to belong_to(:integration).optional } | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters