[MM-16751] golint model (#17896)
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
953eebdef4
Коммит
97ccf0bdf6
@@ -81,10 +81,10 @@ func TestSessionIsOAuthUser(t *testing.T) {
|
||||
isOAuthUser bool
|
||||
}{
|
||||
{"False on empty props", Session{}, false},
|
||||
{"True when key is set to true", Session{Props: StringMap{USER_AUTH_SERVICE_IS_OAUTH: strconv.FormatBool(true)}}, true},
|
||||
{"False when key is set to false", Session{Props: StringMap{USER_AUTH_SERVICE_IS_OAUTH: strconv.FormatBool(false)}}, false},
|
||||
{"Not affected by Session.IsOauth being true", Session{IsOAuth: true}, false},
|
||||
{"Not affected by Session.IsOauth being false", Session{IsOAuth: false, Props: StringMap{USER_AUTH_SERVICE_IS_OAUTH: strconv.FormatBool(true)}}, true},
|
||||
{"True when key is set to true", Session{Props: StringMap{UserAuthServiceIsOAuth: strconv.FormatBool(true)}}, true},
|
||||
{"False when key is set to false", Session{Props: StringMap{UserAuthServiceIsOAuth: strconv.FormatBool(false)}}, false},
|
||||
{"Not affected by Session.IsOAuth being true", Session{IsOAuth: true}, false},
|
||||
{"Not affected by Session.IsOAuth being false", Session{IsOAuth: false, Props: StringMap{UserAuthServiceIsOAuth: strconv.FormatBool(true)}}, true},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
Ссылка в новой задаче
Block a user