Skip to content

Commit

Permalink
add spec to cover append_association nil case
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Yves committed Nov 21, 2024
1 parent b901517 commit 1db62ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/lib/hubspot/utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,13 @@
}
)
end

context 'when no associated_id' do
it 'does not change the list' do
associations_hash = { 'associations' => [] }
described_class.append_association(associations_hash['associations'], 'Ticket', 'Company', nil)
expect(associations_hash).to eq({ 'associations' => [] })
end
end
end
end

0 comments on commit 1db62ca

Please sign in to comment.