Skip to content

Commit

Permalink
Remove items from spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Sep 14, 2020
1 parent 7b82561 commit 2d57e7b
Showing 1 changed file with 9 additions and 51 deletions.
60 changes: 9 additions & 51 deletions spec/Api/CreateOrderApiSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,8 @@ function it_creates_pay_pal_order_based_on_given_payment(
$data['purchase_units'][0]['amount']['value'] === 100 &&
$data['purchase_units'][0]['amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['amount']['breakdown']['shipping']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['amount']['breakdown']['shipping']['value'] === 10 &&
$data['purchase_units'][0]['items'][0]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][0]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['value'] === 90 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['currency_code'] === 'PLN';
$data['purchase_units'][0]['amount']['breakdown']['shipping']['value'] === 10
;
})
)->willReturn(['status' => 'CREATED', 'id' => 123]);

Expand Down Expand Up @@ -169,11 +166,8 @@ function it_creates_pay_pal_order_with_shipping_address_based_on_given_payment(
$data['purchase_units'][0]['shipping']['address']['address_line_1'] === 'Hobbit St. 123' &&
$data['purchase_units'][0]['shipping']['address']['admin_area_2'] === 'Minas Tirith' &&
$data['purchase_units'][0]['shipping']['address']['postal_code'] === '000' &&
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US' &&
$data['purchase_units'][0]['items'][0]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][0]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['value'] === 90 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['currency_code'] === 'PLN';
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US'
;
})
)->willReturn(['status' => 'CREATED', 'id' => 123]);

Expand Down Expand Up @@ -255,15 +249,8 @@ function it_creates_pay_pal_order_with_more_than_one_product(
$data['purchase_units'][0]['shipping']['address']['address_line_1'] === 'Hobbit St. 123' &&
$data['purchase_units'][0]['shipping']['address']['admin_area_2'] === 'Minas Tirith' &&
$data['purchase_units'][0]['shipping']['address']['postal_code'] === '000' &&
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US' &&
$data['purchase_units'][0]['items'][0]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][0]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['value'] === 90 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][1]['name'] === 'PRODUCT_TWO' &&
$data['purchase_units'][0]['items'][1]['quantity'] === 2 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['value'] === 40 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['currency_code'] === 'PLN';
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US'
;
})
)->willReturn(['status' => 'CREATED', 'id' => 123]);

Expand Down Expand Up @@ -345,19 +332,8 @@ function it_creates_pay_pal_order_with_non_neutral_tax_and_changed_quantity(
$data['purchase_units'][0]['shipping']['address']['address_line_1'] === 'Hobbit St. 123' &&
$data['purchase_units'][0]['shipping']['address']['admin_area_2'] === 'Minas Tirith' &&
$data['purchase_units'][0]['shipping']['address']['postal_code'] === '000' &&
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US' &&
$data['purchase_units'][0]['items'][0]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][0]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['value'] === 50 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][0]['tax']['value'] === 10 &&
$data['purchase_units'][0]['items'][0]['tax']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][1]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][1]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['value'] === 50 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][1]['tax']['value'] === 10 &&
$data['purchase_units'][0]['items'][1]['tax']['currency_code'] === 'PLN';
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US'
;
})
)->willReturn(['status' => 'CREATED', 'id' => 123]);

Expand Down Expand Up @@ -451,25 +427,7 @@ function it_creates_pay_pal_order_with_more_than_one_product_with_different_tax_
$data['purchase_units'][0]['shipping']['address']['address_line_1'] === 'Hobbit St. 123' &&
$data['purchase_units'][0]['shipping']['address']['admin_area_2'] === 'Minas Tirith' &&
$data['purchase_units'][0]['shipping']['address']['postal_code'] === '000' &&
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US' &&
$data['purchase_units'][0]['items'][0]['name'] === 'PRODUCT_ONE' &&
$data['purchase_units'][0]['items'][0]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['value'] === 90 &&
$data['purchase_units'][0]['items'][0]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][0]['tax']['value'] === 2 &&
$data['purchase_units'][0]['items'][0]['tax']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][1]['name'] === 'PRODUCT_TWO' &&
$data['purchase_units'][0]['items'][1]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['value'] === 40 &&
$data['purchase_units'][0]['items'][1]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][1]['tax']['value'] === 1 &&
$data['purchase_units'][0]['items'][1]['tax']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][2]['name'] === 'PRODUCT_TWO' &&
$data['purchase_units'][0]['items'][2]['quantity'] === 1 &&
$data['purchase_units'][0]['items'][2]['unit_amount']['value'] === 40 &&
$data['purchase_units'][0]['items'][2]['unit_amount']['currency_code'] === 'PLN' &&
$data['purchase_units'][0]['items'][2]['tax']['value'] === 1 &&
$data['purchase_units'][0]['items'][2]['tax']['currency_code'] === 'PLN'
$data['purchase_units'][0]['shipping']['address']['country_code'] === 'US'
;
})
)->willReturn(['status' => 'CREATED', 'id' => 123]);
Expand Down

0 comments on commit 2d57e7b

Please sign in to comment.