spec/client_spec.rb in venice-0.4.3 vs spec/client_spec.rb in venice-0.5.0
- old
+ new
@@ -107,10 +107,10 @@
client.stub(:json_response_from_verifying_data).and_return(response)
receipt = client.verify! 'asdf'
receipt.latest_receipt_info.should_not be_nil
receipt.latest_receipt_info.first.product_id.should eq 'com.ficklebits.nsscreencast.monthly_sub'
end
-
+
context 'when latest_receipt_info is a hash instead of an array' do
it 'should still create a latest receipt' do
response['latest_receipt_info'] = response['latest_receipt_info'].first
client.stub(:json_response_from_verifying_data).and_return(response)
receipt = client.verify! 'asdf'