Skip to content

Commit

Permalink
Fix specs due to upstream changes on states_required field
Browse files Browse the repository at this point in the history
Country factory was changed to assign a realistic states_required field.
We update our test suite to account for this change.

See solidusio/solidus#4272

[skip ci]
  • Loading branch information
waiting-for-dev committed Aug 11, 2023
1 parent 3091805 commit 7c0ec73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
]
}

let(:country_id) { SolidusGraphqlApi::Schema.id_from_object(create(:country), nil, nil) }
let(:country_id) { SolidusGraphqlApi::Schema.id_from_object(create(:country, states_required: false), nil, nil) }
let(:address) {
address = build_stubbed(:address).slice(:address1, :city, :phone, :zipcode)
address[:countryId] = country_id
Expand Down
4 changes: 2 additions & 2 deletions spec/support/graphql/responses/countries.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
]
},
"statesRequired": false,
"statesRequired": true,
"updatedAt": "2012-12-21T12:00:00Z"
},
{
Expand All @@ -42,7 +42,7 @@
"states": {
"nodes": []
},
"statesRequired": false,
"statesRequired": true,
"updatedAt": "2012-12-21T12:00:00Z"
}
]
Expand Down
12 changes: 6 additions & 6 deletions spec/support/graphql/responses/current_user.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down Expand Up @@ -45,7 +45,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down Expand Up @@ -77,7 +77,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down Expand Up @@ -109,7 +109,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down Expand Up @@ -143,7 +143,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down Expand Up @@ -183,7 +183,7 @@
"iso3": "USA",
"name": "United States",
"numcode": 840,
"statesRequired": false,
"statesRequired": true,
"createdAt": "2012-12-21T12:00:00Z",
"updatedAt": "2012-12-21T12:00:00Z"
},
Expand Down

0 comments on commit 7c0ec73

Please sign in to comment.