spec/fortnox/api/repositories/invoice_spec.rb in fortnox-api-0.2.0 vs spec/fortnox/api/repositories/invoice_spec.rb in fortnox-api-0.3.0

- old
+ new

@@ -31,10 +31,20 @@ # It is not possible to delete Invoces. Therefore, expected nr of Orders # when running .all will continue to increase (until 100, which is max by default). include_examples '.all', 60 - include_examples '.find', 1 + include_examples '.find', 1 do + let( :find_by_hash_failure ){ { yourreference: 'Not found' } } + + let( :single_param_find_by_hash ) do + { find_hash: { yourreference: 'Gandalf the Grey' }, matches: 2 } + end + let( :multi_param_find_by_hash ) do + { find_hash: { yourreference: 'Gandalf the Grey', ourreference: 'Radagast the Brown' }, + matches: 1 } + end + end include_examples '.search', :customername, 'Test', 3 include_examples '.only', :fullypaid, 1 end