|
3 | 3 | describe Iugu::Invoice do
|
4 | 4 | describe '.create' do
|
5 | 5 | it 'should create an invoice for credit card payment', :vcr do
|
6 |
| - invoice = Iugu:: Invoice.create(email: "[email protected]", |
7 |
| - due_date: "2017-11-30", |
8 |
| - items: [{price_cents: 100, description: "Rosquinha", quantity: 99}], |
9 |
| - payable_with:"credit_card") |
| 6 | + invoice = Iugu:: Invoice.create(email: '[email protected]', |
| 7 | + due_date: '2017-11-30', |
| 8 | + items: [{ price_cents: 100, description: 'Rosquinha', quantity: 99 }], |
| 9 | + payable_with: 'credit_card') |
10 | 10 |
|
11 | 11 | expect(invoice.is_new?).to be_falsy
|
12 |
| - expect(invoice.email).to eq("[email protected]") |
13 |
| - expect(invoice.due_date).to eq("2017-11-30") |
14 |
| - expect(invoice.status).to eq("pending") |
| 12 | + expect(invoice.email).to eq('[email protected]') |
| 13 | + expect(invoice.due_date).to eq('2017-11-30') |
| 14 | + expect(invoice.status).to eq('pending') |
15 | 15 | expect(invoice.total_cents).to eq(9900)
|
16 |
| - expect(invoice.payable_with).to eq("credit_card") |
| 16 | + expect(invoice.payable_with).to eq('credit_card') |
17 | 17 | end
|
18 | 18 | end
|
19 | 19 |
|
20 |
| - describe ".fetch" do |
| 20 | + describe '.fetch' do |
21 | 21 | it 'should return invoices', :vcr do
|
22 | 22 | invoices = Iugu::Invoice.fetch
|
23 | 23 |
|
24 | 24 | expect(invoices.total).to eq(5)
|
25 | 25 | end
|
26 | 26 |
|
27 | 27 | it 'should return invoice', :vcr do
|
28 |
| - invoice = Iugu::Invoice.fetch(id: "3F14349B01264947A3765A79B1DEA1B4") |
| 28 | + invoice = Iugu::Invoice.fetch(id: '3F14349B01264947A3765A79B1DEA1B4') |
29 | 29 |
|
30 |
| - expect(invoice.email).to eq("[email protected]") |
31 |
| - expect(invoice.due_date).to eq("2017-11-30") |
32 |
| - expect(invoice.status).to eq("pending") |
| 30 | + expect(invoice.email).to eq('[email protected]') |
| 31 | + expect(invoice.due_date).to eq('2017-11-30') |
| 32 | + expect(invoice.status).to eq('pending') |
33 | 33 | expect(invoice.total_cents).to eq(9900)
|
34 |
| - expect(invoice.payable_with).to eq("credit_card") |
| 34 | + expect(invoice.payable_with).to eq('credit_card') |
35 | 35 | end
|
36 | 36 | end
|
37 | 37 | end
|
0 commit comments