Skip to content

Commit

Permalink
Merge pull request #3013 from alphagov/update-world-spec
Browse files Browse the repository at this point in the history
Change World Index spec to compare hashes, not JSON string
  • Loading branch information
brucebolt authored Dec 2, 2024
2 parents 08d5ffd + 287cd3a commit 4b998c9
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions spec/integration/graphql/world_index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,35 @@
}

expected = {
"data": {
"edition": {
"title": "Help and services around the world",
"worldLocations": [
data: {
edition: {
title: "Help and services around the world",
worldLocations: [
{
"active": true,
"analyticsIdentifier": "WL1",
"contentId": "d3b7ba48-5027-4a98-a594-1108d205dc66",
"name": "Test World Location",
"slug": "test-world-location",
"updatedAt": "2024-10-18T14:22:38+01:00",
active: true,
analyticsIdentifier: "WL1",
contentId: "d3b7ba48-5027-4a98-a594-1108d205dc66",
name: "Test World Location",
slug: "test-world-location",
updatedAt: "2024-10-18T14:22:38+01:00",
},
],
"internationalDelegations": [
internationalDelegations: [
{
"active": false,
"analyticsIdentifier": "WL2",
"contentId": "f0313f16-e25c-4bfe-a0fc-e561833f705f",
"name": "Test International Delegation",
"slug": "test-international-delegation",
"updatedAt": "2024-10-19T15:07:44+01:00",
active: false,
analyticsIdentifier: "WL2",
contentId: "f0313f16-e25c-4bfe-a0fc-e561833f705f",
name: "Test International Delegation",
slug: "test-international-delegation",
updatedAt: "2024-10-19T15:07:44+01:00",
},
],
},

},
}.to_json
}

expect(response.body).to eq(expected)
parsed_response = JSON.parse(response.body).deep_symbolize_keys
expect(parsed_response).to eq(expected)
end
end
end

0 comments on commit 4b998c9

Please sign in to comment.