Skip to content

Commit

Permalink
Merge branch 'fix-blank' into add-employee-billing-type
Browse files Browse the repository at this point in the history
Co-authored-by: Jared Nielson <jnielson@mavenlink.com>
Co-authored-by: Dezeray Kowalski <dkowalski@mavenlink.com>
  • Loading branch information
3 people committed Apr 9, 2024
2 parents fa59640 + 83d5446 commit 6b3b06e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/netsuite/actions/delete_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def response_list
end

def success?
@success ||= response_errors.blank?
@success ||= (response_errors.nil? || response_errors.empty?)
end

def response_errors
Expand Down Expand Up @@ -101,4 +101,4 @@ def delete_list(options = { }, credentials={})
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/netsuite/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def soap_header(headers = nil)
end

def auth_header(credentials={})
if !credentials[:consumer_key].blank? || !consumer_key.blank?
if !credentials[:consumer_key].to_s.empty? || !consumer_key.to_s.empty?
token_auth(credentials)
else
user_auth(credentials)
Expand Down
3 changes: 3 additions & 0 deletions spec/netsuite/actions/delete_list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@

it 'constructs error objects' do
response = NetSuite::Actions::DeleteList.call([klass, :list => customer_list_with_error])

expect(response).to_not be_success

expect(response.errors.keys).to match_array(customer_with_error.internal_id)
expect(response.errors[customer_with_error.internal_id].first.code).to eq('USER_EXCEPTION')
expect(response.errors[customer_with_error.internal_id].first.message).to eq('Invalid record: type=event,id=100015,scompid=TSTDRV96')
Expand Down

0 comments on commit 6b3b06e

Please sign in to comment.