chore: rubocop
chore: fix api test conventions chore: rubocop -A spec/ chore: more rubocop -A fix failing test rubocop fixes removes helper methods that are in my opinion dead code more rubocop fixes rubocop -a --auto-gen-config
This commit is contained in:
parent
f6fb804bbe
commit
fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions
|
|
@ -3,7 +3,7 @@ require_relative '../spec_helper'
|
|||
feature 'admin/configs' do
|
||||
let(:name) { Faker::Lorem.words(number: rand(2..4)).join(' ') }
|
||||
let(:email) { Faker::Internet.email }
|
||||
let(:admin) { create :admin }
|
||||
let(:admin) { create(:admin) }
|
||||
|
||||
before { login admin }
|
||||
|
||||
|
|
@ -51,13 +51,13 @@ feature 'admin/configs' do
|
|||
end
|
||||
|
||||
def compact_hash_deep!(h)
|
||||
h.each do |k, v|
|
||||
h.each do |_k, v|
|
||||
if v.is_a? Hash
|
||||
compact_hash_deep!(v)
|
||||
v.reject! { |k, v| v.blank? }
|
||||
v.compact_blank!
|
||||
end
|
||||
end
|
||||
h.reject! { |k, v| v.blank? }
|
||||
h.compact_blank!
|
||||
h
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue