Skip to content

Commit abf03b6

Browse files
Merge pull request #2 from NeedleInAJayStack/fix/preserveResultOrder
Corrects test field ordering
2 parents 01ff415 + 1c42747 commit abf03b6

File tree

2 files changed

+58
-58
lines changed

2 files changed

+58
-58
lines changed

Tests/GraphQLRxSwiftTests/GraphQL/SubscriptionTests.swift

+54-54
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ class SubscriptionTests : XCTestCase {
5656

5757
XCTAssertEqual(currentResult, GraphQLResult(
5858
data: ["importantEmail": [
59-
"inbox":[
60-
"total": 2,
61-
"unread": 1
62-
],
6359
"email":[
64-
"subject": "Alright",
65-
60+
"from": "[email protected]",
61+
"subject": "Alright"
62+
],
63+
"inbox":[
64+
"unread": 1,
65+
"total": 2
6666
]
6767
]]
6868
))
@@ -150,13 +150,13 @@ class SubscriptionTests : XCTestCase {
150150

151151
XCTAssertEqual(currentResult, GraphQLResult(
152152
data: ["importantEmail": [
153-
"inbox":[
154-
"total": 2,
155-
"unread": 1
156-
],
157153
"email":[
158-
"subject": "Alright",
159-
154+
"from": "[email protected]",
155+
"subject": "Alright"
156+
],
157+
"inbox":[
158+
"unread": 1,
159+
"total": 2
160160
]
161161
]]
162162
))
@@ -410,13 +410,13 @@ class SubscriptionTests : XCTestCase {
410410
))
411411
XCTAssertEqual(currentResult, GraphQLResult(
412412
data: ["importantEmail": [
413-
"inbox":[
414-
"total": 2,
415-
"unread": 1
416-
],
417413
"email":[
418-
"subject": "Alright",
419-
414+
"from": "[email protected]",
415+
"subject": "Alright"
416+
],
417+
"inbox":[
418+
"unread": 1,
419+
"total": 2
420420
]
421421
]]
422422
))
@@ -465,13 +465,13 @@ class SubscriptionTests : XCTestCase {
465465

466466
let expected = GraphQLResult(
467467
data: ["importantEmail": [
468-
"inbox":[
469-
"total": 2,
470-
"unread": 1
471-
],
472468
"email":[
473-
"subject": "Alright",
474-
469+
"from": "[email protected]",
470+
"subject": "Alright"
471+
],
472+
"inbox":[
473+
"unread": 1,
474+
"total": 2
475475
]
476476
]]
477477
)
@@ -516,13 +516,13 @@ class SubscriptionTests : XCTestCase {
516516
))
517517
XCTAssertEqual(currentResult, GraphQLResult(
518518
data: ["importantEmail": [
519-
"inbox":[
520-
"total": 2,
521-
"unread": 1
522-
],
523519
"email":[
524-
"subject": "Alright",
525-
520+
"from": "[email protected]",
521+
"subject": "Alright"
522+
],
523+
"inbox":[
524+
"unread": 1,
525+
"total": 2
526526
]
527527
]]
528528
))
@@ -535,13 +535,13 @@ class SubscriptionTests : XCTestCase {
535535
))
536536
XCTAssertEqual(currentResult, GraphQLResult(
537537
data: ["importantEmail": [
538-
"inbox":[
539-
"total": 3,
540-
"unread": 2
541-
],
542538
"email":[
543-
"subject": "Tools",
544-
539+
"from": "[email protected]",
540+
"subject": "Tools"
541+
],
542+
"inbox":[
543+
"unread": 2,
544+
"total": 3
545545
]
546546
]]
547547
))
@@ -584,13 +584,13 @@ class SubscriptionTests : XCTestCase {
584584
))
585585
let firstMessageExpected = GraphQLResult(
586586
data: ["importantEmail": [
587-
"inbox":[
588-
"total": 2,
589-
"unread": 1
590-
],
591587
"email":[
592-
"subject": "Alright",
593-
588+
"from": "[email protected]",
589+
"subject": "Alright"
590+
],
591+
"inbox":[
592+
"unread": 1,
593+
"total": 2
594594
]
595595
]]
596596
)
@@ -616,13 +616,13 @@ class SubscriptionTests : XCTestCase {
616616
))
617617
XCTAssertEqual(currentResult, GraphQLResult(
618618
data: ["importantEmail": [
619-
"inbox":[
620-
"total": 4,
621-
"unread": 3
622-
],
623619
"email":[
624-
"subject": "Tools",
625-
620+
"from": "[email protected]",
621+
"subject": "Tools"
622+
],
623+
"inbox":[
624+
"unread": 3,
625+
"total": 4
626626
]
627627
]]
628628
))
@@ -657,14 +657,14 @@ class SubscriptionTests : XCTestCase {
657657

658658
let expected = GraphQLResult(
659659
data: ["importantEmail": [
660+
"email":[
661+
"from": "[email protected]",
662+
"subject": "Alright"
663+
],
660664
"inbox":[
661-
"total": 2,
662-
"unread": 1
665+
"unread": 1,
666+
"total": 2
663667
],
664-
"email":[
665-
"subject": "Alright",
666-
667-
]
668668
]]
669669
)
670670

Tests/GraphQLRxSwiftTests/Graphiti/GraphitiRxSwiftTests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ class HelloWorldTests : XCTestCase {
213213

214214
XCTAssertEqual(currentResult, GraphQLResult(data: [
215215
"subscribeUser": [
216-
"name": "Jerry",
217-
"id": "124"
216+
"id": "124",
217+
"name": "Jerry"
218218
]
219219
]))
220220
}
@@ -269,8 +269,8 @@ class HelloWorldTests : XCTestCase {
269269
XCTAssertEqual(currentResult, GraphQLResult(data: [
270270
"subscribeUserEvent": [
271271
"user": [
272-
"name": "Jerry",
273-
"id": "124"
272+
"id": "124",
273+
"name": "Jerry"
274274
]
275275
]
276276
]))

0 commit comments

Comments
 (0)