Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
add pending test for spaces in query values
Browse files Browse the repository at this point in the history
  • Loading branch information
Leif Gensert committed Apr 29, 2013
1 parent e69de13 commit acddd8a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/lib/salesforce_bulk/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@
"003M001200KO82cIAD","K-015699"}
end

let(:batch_result_data_with_spaces_success) do
%Q{"Id","Name"
"003K000057GH39aIAD","Master of Disaster"
"003K001200KO82cIAD","King of the Hill"}
end

it 'should return array of arrays for data' do
SalesforceBulk::Http.should_receive(:process_http_request).
and_return(batch_result_data_success)
Expand All @@ -275,5 +281,15 @@
{'Id' => '003M000057GH39aIAD', 'my_external_id__c' => 'K-00J799'},
{'Id' => '003M001200KO82cIAD', 'my_external_id__c' => 'K-015699'}])
end

it 'should return correct array with spaces' do
pending 'needs to be fixed'
SalesforceBulk::Http.should_receive(:process_http_request).
and_return(batch_result_data_with_spaces_success)
result = SalesforceBulk::Http.query_batch_result_data('a','b','c','d','e','f')
expect(result).to eq([
{'Id' => '003K000057GH39aIAD', 'Name' => 'Master of Disaster'},
{'Id' => '003K001200KO82cIAD', 'Name' => 'King of the Hill'}])
end
end
end

0 comments on commit acddd8a

Please sign in to comment.