File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments