Skip to content

Commit 6e17aff

Browse files
committed
Update tests for contact and user
1 parent e77cdd8 commit 6e17aff

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

spec/unit/intercom/contact_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@
9090
_(contact.to_hash['custom_attributes']).must_equal 'mad' => 123, 'other' => now.to_i, 'thing' => 'yay'
9191
end
9292

93-
it 'rejects nested data structures in custom_attributes' do
93+
it 'rejects lists in custom_attributes' do
9494
contact = Intercom::Contact.new
9595

9696
_(proc { contact.custom_attributes['thing'] = [1] }).must_raise(ArgumentError)
97-
_(proc { contact.custom_attributes['thing'] = { 1 => 2 } }).must_raise(ArgumentError)
98-
_(proc { contact.custom_attributes['thing'] = { 1 => { 2 => 3 } } }).must_raise(ArgumentError)
9997

10098
contact = Intercom::Contact.new(test_contact)
10199
_(proc { contact.custom_attributes['thing'] = [1] }).must_raise(ArgumentError)

spec/unit/intercom/user_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@
106106
_(user.to_hash['companies']).must_equal companies
107107
end
108108

109-
it 'rejects nested data structures in custom_attributes' do
109+
it 'rejects lists in custom_attributes' do
110110
user = Intercom::User.new
111111

112112
_(proc { user.custom_attributes['thing'] = [1] }).must_raise(ArgumentError)
113-
_(proc { user.custom_attributes['thing'] = { 1 => 2 } }).must_raise(ArgumentError)
114-
_(proc { user.custom_attributes['thing'] = { 1 => { 2 => 3 } } }).must_raise(ArgumentError)
115113

116114
user = Intercom::User.from_api(test_user)
117115
_(proc { user.custom_attributes['thing'] = [1] }).must_raise(ArgumentError)

0 commit comments

Comments
 (0)