spec/netsuite/actions/search_spec.rb in netsuite-0.3.2 vs spec/netsuite/actions/search_spec.rb in netsuite-0.3.3
- old
+ new
@@ -5,21 +5,22 @@
after(:all) { savon.unmock! }
it "handles custom auth credentials" do
allow(NetSuite::Configuration).to receive(:connection).and_return(double().as_null_object)
- NetSuite::Records::Customer.search({}, {
+ credentials = {
email: 'fake@domain.com',
password: 'fake'
- })
+ }
+ NetSuite::Records::Customer.search({}, credentials)
expect(NetSuite::Configuration).to have_received(:connection).with({:soap_header=>{
"platformMsgs:passport"=>{
"platformCore:email"=>"fake@domain.com",
"platformCore:password"=>"fake",
"platformCore:account"=>"1234",
"platformCore:role"=>{:@internalId=>"3"}
- }, "platformMsgs:SearchPreferences"=>{}}}
+ }, "platformMsgs:SearchPreferences"=>{}}}, credentials
)
end
context "search class name" do
it "infers class name if class doesn't specify search class" do