Reduce rubocop diff
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# rubocop:disable RSpec/DescribeClass
|
||||
describe 'Markdown Embeds Configuration' do
|
||||
# rubocop:enable RSpec/DescribeClass
|
||||
let(:config) { YAML.load_file(Rails.root.join('config/markdown_embeds.yml')) }
|
||||
|
||||
describe 'YAML structure' do
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe DeviseOverrides::SessionsController do
|
||||
RSpec.describe DeviseOverrides::SessionsController, type: :controller do
|
||||
include Devise::Test::ControllerHelpers
|
||||
|
||||
before do
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ReportingEventHelper do
|
||||
RSpec.describe ReportingEventHelper, type: :helper do
|
||||
describe '#last_non_human_activity' do
|
||||
let(:account) { create(:account) }
|
||||
let(:inbox) { create(:inbox, account: account) }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AutoAssignment::AssignmentJob do
|
||||
RSpec.describe AutoAssignment::AssignmentJob, type: :job do
|
||||
let(:account) { create(:account) }
|
||||
let(:inbox) { create(:inbox, account: account, enable_auto_assignment: true) }
|
||||
let(:agent) { create(:user, account: account, role: :agent, availability: :online) }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AutoAssignment::PeriodicAssignmentJob do
|
||||
RSpec.describe AutoAssignment::PeriodicAssignmentJob, type: :job do
|
||||
let(:account) { create(:account) }
|
||||
let(:inbox) { create(:inbox, account: account, enable_auto_assignment: true) }
|
||||
let(:assignment_policy) { create(:assignment_policy, account: account) }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Contacts::BulkActionJob do
|
||||
RSpec.describe Contacts::BulkActionJob, type: :job do
|
||||
let(:account) { create(:account) }
|
||||
let(:user) { create(:user, account: account) }
|
||||
let(:params) { { 'ids' => [1], 'labels' => { 'add' => ['vip'] } } }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ConversationReplyEmailJob do
|
||||
RSpec.describe ConversationReplyEmailJob, type: :job do
|
||||
let(:conversation) { create(:conversation) }
|
||||
let(:mailer) { double }
|
||||
let(:mailer_action) { double }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe DeleteObjectJob do
|
||||
RSpec.describe DeleteObjectJob, type: :job do
|
||||
describe '#perform' do
|
||||
context 'when object is heavy (Inbox)' do
|
||||
let!(:account) { create(:account) }
|
||||
|
||||
@@ -143,13 +143,13 @@ RSpec.describe Account do
|
||||
context 'when auto_resolve_after' do
|
||||
it 'validates minimum value' do
|
||||
account.settings = { auto_resolve_after: 4 }
|
||||
expect(account).not_to be_valid
|
||||
expect(account).to be_invalid
|
||||
expect(account.errors.messages).to eq({ auto_resolve_after: ['must be greater than or equal to 10'] })
|
||||
end
|
||||
|
||||
it 'validates maximum value' do
|
||||
account.settings = { auto_resolve_after: 1_439_857 }
|
||||
expect(account).not_to be_valid
|
||||
expect(account).to be_invalid
|
||||
expect(account.errors.messages).to eq({ auto_resolve_after: ['must be less than or equal to 1439856'] })
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Conversation Audit' do
|
||||
RSpec.describe 'Conversation Audit', type: :model do
|
||||
let(:account) { create(:account) }
|
||||
let(:conversation) { create(:conversation, account: account) }
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ end
|
||||
RSpec.configure do |config|
|
||||
config.include FactoryBot::Syntax::Methods
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
config.fixture_paths = [Rails.root.join('spec/fixtures')]
|
||||
config.fixture_path = Rails.root.join('spec/fixtures')
|
||||
|
||||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||
# examples within a transaction, remove the following line or assign false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Api::V1::Accounts::BaseController' do
|
||||
RSpec.describe 'Api::V1::Accounts::BaseController', type: :request do
|
||||
let(:account) { create(:account) }
|
||||
let(:inbox) { create(:inbox, account: account) }
|
||||
let!(:conversation) { create(:conversation, account: account, inbox: inbox) }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'MFA API' do
|
||||
RSpec.describe 'MFA API', type: :request do
|
||||
before do
|
||||
skip('Skipping since MFA is not configured in this environment') unless Chatwoot.encryption_configured?
|
||||
allow(Chatwoot).to receive(:mfa_enabled?).and_return(true)
|
||||
|
||||
Reference in New Issue
Block a user