-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from kieter/feature/add-payment-method-to-order
Add the payment_method field to Order
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ func TestOrderService_Create(t *testing.T) { | |
data := `{ | ||
"project_id": "` + testProjectID + `", | ||
"card_id": 12345, | ||
"payment_method": "credit_card", | ||
"briefing": "Terms of use of our app.", | ||
"source_language_iso": "en_US", | ||
"target_language_isos": [ | ||
|
@@ -47,6 +48,7 @@ func TestOrderService_Create(t *testing.T) { | |
_, _ = fmt.Fprint(w, `{ | ||
"order_id": "20181231AAAA", | ||
"project_id": "`+testProjectID+`", | ||
"payment_method": "credit_card", | ||
"card_id": 12345, | ||
"status": "in progress", | ||
"created_at": "2018-12-31 12:00:00 (Etc/UTC)", | ||
|
@@ -82,6 +84,7 @@ func TestOrderService_Create(t *testing.T) { | |
|
||
r, err := client.Orders().Create(1, CreateOrder{ | ||
ProjectID: testProjectID, | ||
PaymentMethod: "credit_card", | ||
CardID: 12345, | ||
Briefing: "Terms of use of our app.", | ||
SourceLangISO: "en_US", | ||
|
@@ -107,6 +110,7 @@ func TestOrderService_Create(t *testing.T) { | |
CreatedByEmail: "[email protected]", | ||
}, | ||
OrderID: "20181231AAAA", | ||
PaymentMethod: "credit_card", | ||
CardID: 12345, | ||
Status: "in progress", | ||
SourceLangISO: "en_US", | ||
|
@@ -187,7 +191,8 @@ func TestOrderService_Retrieve(t *testing.T) { | |
testHeader(t, r, apiTokenHeader, testApiToken) | ||
|
||
_, _ = fmt.Fprint(w, `{ | ||
"order_id": "20181231AAAA" | ||
"order_id": "20181231AAAA", | ||
"payment_method": "credit_card" | ||
}`) | ||
}) | ||
|
||
|
@@ -197,7 +202,8 @@ func TestOrderService_Retrieve(t *testing.T) { | |
} | ||
|
||
want := Order{ | ||
OrderID: "20181231AAAA", | ||
OrderID: "20181231AAAA", | ||
PaymentMethod: "credit_card", | ||
} | ||
|
||
if !reflect.DeepEqual(r, want) { | ||
|