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:
Philipp Rothmann 2023-05-12 13:01:12 +02:00 committed by Philipp Rothmann
parent f6fb804bbe
commit fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions

View file

@ -1,20 +1,20 @@
require_relative '../spec_helper'
feature 'supplier' do
let(:supplier) { create :supplier }
let(:user) { create :user, :role_suppliers }
let(:supplier) { create(:supplier) }
let(:user) { create(:user, :role_suppliers) }
before { login user }
describe 'create new' do
it 'can be created' do
create :supplier_category
create(:supplier_category)
visit new_supplier_path
supplier = build :supplier
supplier = build(:supplier)
within('#new_supplier') do
fill_in 'supplier_name', :with => supplier.name
fill_in 'supplier_address', :with => supplier.address
fill_in 'supplier_phone', :with => supplier.phone
fill_in 'supplier_name', with: supplier.name
fill_in 'supplier_address', with: supplier.address
fill_in 'supplier_phone', with: supplier.phone
find('input[type="submit"]').click
end
expect(page).to have_content(supplier.name)
@ -38,7 +38,7 @@ feature 'supplier' do
end
it 'can be updated' do
new_supplier = build :supplier
new_supplier = build(:supplier)
supplier
visit edit_supplier_path(id: supplier.id)
fill_in 'supplier_name', with: new_supplier.name