@@ -65,19 +65,6 @@ describe('Completes parameters outside of databases, roles, user names', () => {
65
65
} ) ;
66
66
} ) ;
67
67
68
- test ( 'Correctly suggests parameter in ENABLE SERVER' , ( ) => {
69
- const query = 'ENABLE SERVER ' ;
70
- testCompletions ( {
71
- query,
72
- dbSchema,
73
- expected : [ { label : '$stringParam' , kind : CompletionItemKind . Variable } ] ,
74
- excluded : [
75
- { label : '$intParam' , kind : CompletionItemKind . Variable } ,
76
- { label : '$mapParam' , kind : CompletionItemKind . Variable } ,
77
- ] ,
78
- } ) ;
79
- } ) ;
80
-
81
68
test ( 'Suggests parameter as map properties' , ( ) => {
82
69
const query = 'match (v :Movie ' ;
83
70
@@ -175,4 +162,25 @@ describe('Completes parameters outside of databases, roles, user names', () => {
175
162
} ) ;
176
163
} ) ;
177
164
} ) ;
165
+
166
+ test ( 'Suggests parameters for passwords' , ( ) => {
167
+ const cases = [
168
+ 'ALTER CURRENT USER SET PASSWORD FROM ' ,
169
+ 'ALTER CURRENT USER SET PASSWORD FROM $pw to ' ,
170
+ 'ALTER USER foo IF EXISTS SET PASSWORD ' ,
171
+ ] ;
172
+ cases . forEach ( ( query ) => {
173
+ testCompletions ( {
174
+ query,
175
+ dbSchema,
176
+ expected : [
177
+ { label : '$stringParam' , kind : CompletionItemKind . Variable } ,
178
+ ] ,
179
+ excluded : [
180
+ { label : '$intParam' , kind : CompletionItemKind . Variable } ,
181
+ { label : '$mapParam' , kind : CompletionItemKind . Variable } ,
182
+ ] ,
183
+ } ) ;
184
+ } ) ;
185
+ } ) ;
178
186
} ) ;
0 commit comments