spec/jortt/client/invoices_spec.rb in jortt-4.1.0 vs spec/jortt/client/invoices_spec.rb in jortt-4.2.0
- old
+ new
@@ -18,9 +18,18 @@
to_return(status: 200, body: response_body)
end
it { should eq('invoice_id' => 'abc') }
end
+ describe '#get' do
+ subject { invoices.get('foo') }
+ before do
+ stub_request(:get, 'http://app:secret@foo/invoices/id/foo').
+ to_return(status: 200, body: '{"id": "foo"}')
+ end
+ it { should eq('id' => 'foo') }
+ end
+
describe '#search' do
subject { invoices.search('terms') }
before do
stub_request(:get, 'http://app:secret@foo/invoices/search?query=terms').
to_return(status: 200, body: '{"invoices": []}')