@@ -40,21 +40,24 @@ func TestSerialization_AuthSerialization(t *testing.T) {
4040 assertSerializeJSON (
4141 t ,
4242 OAuth2AccessToken ("http://foo.com/authorization" , "http://foo.com/token" ),
43- `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization","tokenUrl":"http://foo.com/token"}` )
43+ `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization",` +
44+ `"tokenUrl":"http://foo.com/token"}` )
4445
4546 auth1 := OAuth2Implicit ("http://foo.com/authorization" )
4647 auth1 .AddScope ("email" , "read your email" )
4748 assertSerializeJSON (
4849 t ,
4950 auth1 ,
50- `{"type":"oauth2","flow":"implicit","authorizationUrl":"http://foo.com/authorization","scopes":{"email":"read your email"}}` )
51+ `{"type":"oauth2","flow":"implicit","authorizationUrl":"http://foo.com/authorization",` +
52+ `"scopes":{"email":"read your email"}}` )
5153
5254 auth2 := OAuth2Password ("http://foo.com/authorization" )
5355 auth2 .AddScope ("email" , "read your email" )
5456 assertSerializeJSON (
5557 t ,
5658 auth2 ,
57- `{"type":"oauth2","flow":"password","tokenUrl":"http://foo.com/authorization","scopes":{"email":"read your email"}}` )
59+ `{"type":"oauth2","flow":"password","tokenUrl":"http://foo.com/authorization",` +
60+ `"scopes":{"email":"read your email"}}` )
5861
5962 auth3 := OAuth2Application ("http://foo.com/token" )
6063 auth3 .AddScope ("email" , "read your email" )
@@ -68,7 +71,8 @@ func TestSerialization_AuthSerialization(t *testing.T) {
6871 assertSerializeJSON (
6972 t ,
7073 auth4 ,
71- `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization","tokenUrl":"http://foo.com/token","scopes":{"email":"read your email"}}` )
74+ `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization",` +
75+ `"tokenUrl":"http://foo.com/token","scopes":{"email":"read your email"}}` )
7276}
7377
7478func TestSerialization_AuthDeserialization (t * testing.T ) {
@@ -97,13 +101,15 @@ func TestSerialization_AuthDeserialization(t *testing.T) {
97101
98102 assertParsesJSON (
99103 t ,
100- `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","tokenUrl":"http://foo.com/token","type":"oauth2"}` ,
104+ `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","tokenUrl":"http://foo.com/token",` +
105+ `"type":"oauth2"}` ,
101106 OAuth2AccessToken ("http://foo.com/authorization" , "http://foo.com/token" ))
102107
103108 auth1 := OAuth2Implicit ("http://foo.com/authorization" )
104109 auth1 .AddScope ("email" , "read your email" )
105110 assertParsesJSON (t ,
106- `{"authorizationUrl":"http://foo.com/authorization","flow":"implicit","scopes":{"email":"read your email"},"type":"oauth2"}` ,
111+ `{"authorizationUrl":"http://foo.com/authorization","flow":"implicit","scopes":{"email":"read your email"},` +
112+ `"type":"oauth2"}` ,
107113 auth1 )
108114
109115 auth2 := OAuth2Password ("http://foo.com/token" )
@@ -122,7 +128,8 @@ func TestSerialization_AuthDeserialization(t *testing.T) {
122128 auth4 .AddScope ("email" , "read your email" )
123129 assertParsesJSON (
124130 t ,
125- `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","scopes":{"email":"read your email"},"tokenUrl":"http://foo.com/token","type":"oauth2"}` ,
131+ `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","scopes":{"email":"read your email"},` +
132+ `"tokenUrl":"http://foo.com/token","type":"oauth2"}` ,
126133 auth4 )
127134
128135}
0 commit comments