-
Notifications
You must be signed in to change notification settings - Fork 14
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 #56 from uphold/feature/add-merchant-origin
Add merchant model to transaction origin
- Loading branch information
Showing
3 changed files
with
33 additions
and
9 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 |
---|---|---|
|
@@ -373,6 +373,13 @@ class TransactionTest: UpholdTestCase { | |
"\"currency\": \"BTC\"," + | ||
"\"description\": \"Fuz Buz\"," + | ||
"\"fee\": \"0.00\"," + | ||
"\"merchant\": {" + | ||
"\"city\": \"foo\"," + | ||
"\"country\": \"bar\"," + | ||
"\"name\": \"foobar\"," + | ||
"\"state\": \"foobiz\"," + | ||
"\"zipCode\": \"foobuz\"," + | ||
"}," + | ||
"\"rate\": \"1.00\"," + | ||
"\"sources\": [{" + | ||
"\"id\": \"fizbuz\"," + | ||
|
@@ -443,11 +450,11 @@ class TransactionTest: UpholdTestCase { | |
XCTAssertEqual(transaction!.destination!.currency!, "BTC", "Failed: Transaction destination currency didn't match.") | ||
XCTAssertEqual(transaction!.destination!.description!, "[email protected]", "Failed: Transaction destination description didn't match.") | ||
XCTAssertEqual(transaction!.destination!.fee!, "0.00", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.city!, "foo", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.country!, "bar", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.name!, "foobar", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.state!, "foobiz", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.zipCode!, "foobuz", "Failed: Transaction destination fee didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.city!, "foo", "Failed: Transaction destination merchant city didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.country!, "bar", "Failed: Transaction destination merchant country didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.name!, "foobar", "Failed: Transaction destination merchant name didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.state!, "foobiz", "Failed: Transaction destination merchant state didn't match.") | ||
XCTAssertEqual(transaction!.destination!.merchant!.zipCode!, "foobuz", "Failed: Transaction destination merchant zip code didn't match.") | ||
XCTAssertEqual(transaction!.destination!.rate!, "1.00", "Failed: Transaction destination rate didn't match.") | ||
XCTAssertEqual(transaction!.destination!.type!, "email", "Failed: Transaction destination type didn't match.") | ||
XCTAssertEqual(transaction!.destination!.username!, "fizbiz", "Failed: Transaction destination username didn't match.") | ||
|
@@ -472,6 +479,11 @@ class TransactionTest: UpholdTestCase { | |
XCTAssertEqual(transaction!.origin!.currency!, "BTC", "Failed: Transaction origin currency didn't match.") | ||
XCTAssertEqual(transaction!.origin!.description!, "Fuz Buz", "Failed: Transaction origin description didn't match.") | ||
XCTAssertEqual(transaction!.origin!.fee!, "0.00", "Failed: Transaction origin fee didn't match.") | ||
XCTAssertEqual(transaction!.origin!.merchant!.city!, "foo", "Failed: Transaction origin merchant city didn't match.") | ||
XCTAssertEqual(transaction!.origin!.merchant!.country!, "bar", "Failed: Transaction origin merchant country didn't match.") | ||
XCTAssertEqual(transaction!.origin!.merchant!.name!, "foobar", "Failed: Transaction origin merchant name didn't match.") | ||
XCTAssertEqual(transaction!.origin!.merchant!.state!, "foobiz", "Failed: Transaction origin merchant state didn't match.") | ||
XCTAssertEqual(transaction!.origin!.merchant!.zipCode!, "foobuz", "Failed: Transaction origin merchant zip code didn't match.") | ||
XCTAssertEqual(transaction!.origin!.rate!, "1.00", "Failed: Transaction origin rate didn't match.") | ||
XCTAssertEqual(transaction!.origin!.sources!.count, 1, "Failed: Transaction origin type didn't match.") | ||
XCTAssertEqual(transaction!.origin!.sources![0].id!, "fizbuz", "Failed: Transaction origin type didn't match.") | ||
|
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