Chore: clean up Reporting Events (#4044)

Tech debt clean up

Fixes #4057

Co-authored-by: Aswin Dev P S <aswin@chatwoot.com>
This commit is contained in:
Sojan Jose
2022-02-28 18:16:12 +05:30
committed by GitHub
parent 12c0be002e
commit 4260441f8c
21 changed files with 54 additions and 186 deletions

View File

@@ -18,7 +18,7 @@ RSpec.describe Account do
it { is_expected.to have_many(:web_widgets).class_name('::Channel::WebWidget').dependent(:destroy_async) }
it { is_expected.to have_many(:webhooks).dependent(:destroy_async) }
it { is_expected.to have_many(:notification_settings).dependent(:destroy_async) }
it { is_expected.to have_many(:events) }
it { is_expected.to have_many(:reporting_events) }
it { is_expected.to have_many(:kbase_portals).dependent(:destroy_async) }
it { is_expected.to have_many(:kbase_categories).dependent(:destroy_async) }
it { is_expected.to have_many(:teams).dependent(:destroy_async) }

View File

@@ -29,7 +29,7 @@ RSpec.describe Inbox do
it { is_expected.to have_many(:webhooks).dependent(:destroy_async) }
it { is_expected.to have_many(:events) }
it { is_expected.to have_many(:reporting_events) }
it { is_expected.to have_many(:hooks) }
end

View File

@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe Event, type: :model do
RSpec.describe ReportingEvent, type: :model do
describe 'validations' do
it { is_expected.to validate_presence_of(:account_id) }
it { is_expected.to validate_presence_of(:name) }

View File

@@ -19,7 +19,7 @@ RSpec.describe User do
it { is_expected.to have_many(:inbox_members).dependent(:destroy_async) }
it { is_expected.to have_many(:notification_settings).dependent(:destroy_async) }
it { is_expected.to have_many(:messages) }
it { is_expected.to have_many(:events) }
it { is_expected.to have_many(:reporting_events) }
it { is_expected.to have_many(:teams) }
end