This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new method for handling large saved searches
The method we have used up til now is deficient when handling a large saved search containing a large number of rows with the same internal ID (!). The new method needs testing before it's used everywhere.
- Loading branch information
Showing
6 changed files
with
96 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | ||
|
||
describe "NetsuiteRestClient" do | ||
it "should get a saved search" do | ||
nsc = Netsuite::Client.new(ENV['NETSUITE_ACCOUNT_ID'], | ||
ENV['NETSUITE_LOGIN'], | ||
ENV['NETSUITE_PASSWORD'], | ||
ENV['NETSUITE_ROLE_ID']) | ||
res = nsc.get_saved_search('InventoryItem', '678') | ||
res.should_not be_empty | ||
res.should be_kind_of(Array) | ||
res.first.should be_kind_of(Hash) | ||
puts "returned result of #{res.count} rows" | ||
|
||
describe '#get_saved_search' do | ||
it "should get a saved search" do | ||
nsc = Netsuite::Client.new(ENV['NETSUITE_ACCOUNT_ID'], | ||
ENV['NETSUITE_LOGIN'], | ||
ENV['NETSUITE_PASSWORD'], | ||
ENV['NETSUITE_ROLE_ID']) | ||
res = nsc.get_saved_search('InventoryItem', '678') | ||
res.should_not be_empty | ||
res.should be_kind_of(Array) | ||
res.first.should be_kind_of(Hash) | ||
puts "returned result of #{res.count} rows" | ||
end | ||
end | ||
|
||
describe '#get_large_saved_search' do | ||
it "should get a saved search" do | ||
nsc = Netsuite::Client.new(ENV['NETSUITE_ACCOUNT_ID'], | ||
ENV['NETSUITE_LOGIN'], | ||
ENV['NETSUITE_PASSWORD'], | ||
ENV['NETSUITE_ROLE_ID']) | ||
res = nsc.get_large_saved_search('InventoryItem', '678') | ||
res.should_not be_empty | ||
res.should be_kind_of(Array) | ||
res.first.should be_kind_of(Hash) | ||
puts "returned result of #{res.count} rows" | ||
end | ||
end | ||
|
||
end |