@@ -90,7 +90,7 @@ describe("The OAuth 2.0 Refresh Token Grant", function () {
9090} )
9191} )
9292
93- it ( "should narrow Refresh Tokenscopes correctly" , function ( ) {
93+ it ( "should narrowand broaded Refresh Tokenscope correctly" , function ( ) {
9494const referrer = `${ Cypress . env ( "client_url" ) } /empty`
9595cy . visit ( referrer , {
9696failOnStatusCode :false ,
@@ -109,23 +109,21 @@ describe("The OAuth 2.0 Refresh Token Grant", function () {
109109} ) . then ( ( originalResponse ) => {
110110expect ( originalResponse . status ) . to . eq ( 200 )
111111expect ( originalResponse . body . refresh_token ) . to . not . be . empty
112- expect ( originalResponse . body . scope ) . to . eq ( "offline_access openid foo bar baz" )
112+ expect ( originalResponse . body . scope ) . to . deep . equal ( [ "offline_access" , " openid" , " foo" , " bar" , " baz"] )
113113
114114const originalToken = originalResponse . body . refresh_token
115115
116- cy . refreshTokenBrowserScope ( client , originalToken , "offline_access openid foo" ) . then (
117- ( refreshedResponse ) => {
116+ cy . refreshTokenBrowserScope ( client , originalToken , "offline_access openid foo" ) . then ( ( refreshedResponse ) => {
118117expect ( refreshedResponse . status ) . to . eq ( 200 )
119118expect ( refreshedResponse . body . refresh_token ) . to . not . be . empty
120- expect ( refreshedResponse . body . scope ) . to . eq ( "offline_access openid foo" )
119+ expect ( refreshedResponse . body . scope ) . to . deep . equal ( [ "offline_access" , " openid" , " foo"] )
121120
122121const refreshedToken = refreshedResponse . body . refresh_token
123122
124- cy . refreshTokenBrowserScope ( client , refreshedToken , "offline_access openid foo bar baz" ) . then (
125- ( finalRefreshedResponse ) => {
123+ cy . refreshTokenBrowserScope ( client , refreshedToken , "offline_access openid foo bar" ) . then ( ( finalRefreshedResponse ) => {
126124expect ( finalRefreshedResponse . status ) . to . eq ( 200 )
127125expect ( finalRefreshedResponse . body . refresh_token ) . to . not . be . empty
128- expect ( finalRefreshedResponse . body . scope ) . to . eq ( "offline_access openid foo bar baz" )
126+ expect ( finalRefreshedResponse . body . scope ) . to . deep . equal ( [ "offline_access" , " openid" , " foo" , " bar" ] )
129127} ,
130128)
131129} ,