Skip to content

Commit

Permalink
code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
annvelents committed Jan 9, 2025
1 parent 88e06b3 commit 7870b8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class AddCodeUniquenessConstraintOnInvoiceCustomSections < ActiveRecord::Migration[7.1]
class RemoveCodeUniquenessConstraintOnInvoiceCustomSections < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
Expand Down
6 changes: 3 additions & 3 deletions spec/graphql/mutations/customers/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:stripe_provider) { create(:stripe_provider, organization:) }
let(:tax) { create(:tax, organization:) }
let(:external_id) { SecureRandom.uuid }
let(:invoice_custom_sections) { create_list(:invoice_custom_section, 3, organization:) }
let(:invoice_custom_sections) { create_list(:invoice_custom_section, 2, organization:) }

let(:mutation) do
<<~GQL
Expand Down Expand Up @@ -76,7 +76,7 @@
}
],
taxCodes: [tax.code],
applicableInvoiceCustomSectionIds: invoice_custom_sections[0..1].map(&:id)
applicableInvoiceCustomSectionIds: invoice_custom_sections.map(&:id)
}
end

Expand Down Expand Up @@ -132,7 +132,7 @@
expect(result_data['billingConfiguration']['id']).to eq("#{customer.id}-c0nf")
expect(result_data['metadata'][0]['key']).to eq('test-key')
expect(result_data['taxes'][0]['code']).to eq(tax.code)
expect(result_data['applicableInvoiceCustomSections']).to match_array(invoice_custom_sections[0..1].map { |section| {'id' => section.id} })
expect(result_data['applicableInvoiceCustomSections']).to match_array(invoice_custom_sections.map { |section| {'id' => section.id} })
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/graphql/resolvers/customer_resolver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
end
end

context 'when customer has invoice_custom_sections nested from organization ' do
context 'when customer has invoice_custom_sections selected on organization level' do
before do
customer.selected_invoice_custom_sections = []
end
Expand Down

0 comments on commit 7870b8d

Please sign in to comment.