From fd4ccdcfc8ae5d937d2cf88d033a67531b759114 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Mon, 2 Jan 2023 19:24:54 +1100 Subject: [PATCH] test: use to deep equal --- cypress/integration/oauth2/refresh_token.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cypress/integration/oauth2/refresh_token.js b/cypress/integration/oauth2/refresh_token.js index f1f1c72521e..4beadf104d8 100644 --- a/cypress/integration/oauth2/refresh_token.js +++ b/cypress/integration/oauth2/refresh_token.js @@ -109,23 +109,21 @@ describe("The OAuth 2.0 Refresh Token Grant", function () { }).then((originalResponse) => { expect(originalResponse.status).to.eq(200) expect(originalResponse.body.refresh_token).to.not.be.empty - expect(originalResponse.body.scope).to.eq("offline_access openid foo bar baz") + expect(originalResponse.body.scope).to.deep.equal(["offline_access", "openid", "foo", "bar", "baz"]) const originalToken = originalResponse.body.refresh_token - cy.refreshTokenBrowserScope(client, originalToken, "offline_access openid foo").then( - (refreshedResponse) => { + cy.refreshTokenBrowserScope(client, originalToken, "offline_access openid foo").then((refreshedResponse) => { expect(refreshedResponse.status).to.eq(200) expect(refreshedResponse.body.refresh_token).to.not.be.empty - expect(refreshedResponse.body.scope).to.eq("offline_access openid foo") + expect(refreshedResponse.body.scope).to.deep.equal(["offline_access", "openid", "foo"]) const refreshedToken = refreshedResponse.body.refresh_token - cy.refreshTokenBrowserScope(client, refreshedToken, "offline_access openid foo bar baz").then( - (finalRefreshedResponse) => { + cy.refreshTokenBrowserScope(client, refreshedToken, "offline_access openid foo bar").then((finalRefreshedResponse) => { expect(finalRefreshedResponse.status).to.eq(200) expect(finalRefreshedResponse.body.refresh_token).to.not.be.empty - expect(finalRefreshedResponse.body.scope).to.eq("offline_access openid foo bar baz") + expect(finalRefreshedResponse.body.scope).to.deep.equal(["offline_access", "openid", "foo", "bar"]) }, ) },