🚨Fix Rubocop lint errors
This commit is contained in:
@@ -4,12 +4,9 @@ FactoryBot.define do
|
||||
factory :contact do
|
||||
sequence(:name) { |n| "Widget #{n}" }
|
||||
sequence(:email) { |n| "widget-#{n}@example.com" }
|
||||
phone_number { "+123456789011" }
|
||||
phone_number { '+123456789011' }
|
||||
source_id { rand(100) }
|
||||
account
|
||||
inbox
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ FactoryBot.define do
|
||||
factory :inbox do
|
||||
account
|
||||
association :channel, factory: :channel_widget
|
||||
name { "Inbox" }
|
||||
name { 'Inbox' }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,10 +9,10 @@ FactoryBot.define do
|
||||
provider { 'email' }
|
||||
uid { SecureRandom.uuid }
|
||||
name { Faker::Name.name }
|
||||
nickname { Faker::Name.first_name }
|
||||
nickname { Faker::Name.first_name }
|
||||
email { nickname + '@example.com' }
|
||||
role { 'agent' }
|
||||
password { "password" }
|
||||
password { 'password' }
|
||||
account
|
||||
|
||||
after(:build) do |user, evaluator|
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
require "rails_helper"
|
||||
require 'rails_helper'
|
||||
|
||||
describe FrontendUrlsHelper, type: :helper do
|
||||
describe "#frontend_url" do
|
||||
context "without query params" do
|
||||
it "creates path correctly" do
|
||||
expect(helper.frontend_url('dashboard')).to eq "http://test.host/app/dashboard"
|
||||
describe '#frontend_url' do
|
||||
context 'without query params' do
|
||||
it 'creates path correctly' do
|
||||
expect(helper.frontend_url('dashboard')).to eq 'http://test.host/app/dashboard'
|
||||
end
|
||||
end
|
||||
|
||||
context "with query params" do
|
||||
it "creates path correctly" do
|
||||
expect(helper.frontend_url('dashboard', p1: 'p1', p2: 'p2')).to eq "http://test.host/app/dashboard?p1=p1&p2=p2"
|
||||
context 'with query params' do
|
||||
it 'creates path correctly' do
|
||||
expect(helper.frontend_url('dashboard', p1: 'p1', p2: 'p2')).to eq 'http://test.host/app/dashboard?p1=p1&p2=p2'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Confirmation Instructions', type: :mailer do
|
||||
describe :notify do
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
require 'spec_helper'
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require File.expand_path('../config/environment', __dir__)
|
||||
# Prevent database truncation if the environment is production
|
||||
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
||||
abort('The Rails environment is running in production mode!') if Rails.env.production?
|
||||
require 'rspec/rails'
|
||||
# Add additional requires below this line. Rails is not loaded until this point!
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.expect_with :rspec do |expectations|
|
||||
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
||||
@@ -11,5 +10,4 @@ RSpec.configure do |config|
|
||||
config.shared_context_metadata_behavior = :apply_to_host_groups
|
||||
|
||||
# config.include Rails.application.routes.url_helpers
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require File.expand_path('../config/environment', __dir__)
|
||||
require 'rails/test_help'
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
|
||||
Reference in New Issue
Block a user