@@ -179,55 +179,55 @@ mod tests {
179179
180180 #[ sqlx:: test( migrator = "pgt_test_utils::MIGRATIONS" ) ]
181181 async fn works_in_grant_statements ( pool : PgPool ) {
182- // assert_complete_results(
183- // format!(
184- // r#"grant select
185- // on table public.users
186- // to {}"#,
187- // CURSOR_POS
188- // )
189- // .as_str(),
190- // vec![
191- // // recognizing already mentioned roles is not supported for now
192- // CompletionAssertion::LabelAndKind("owner".into(), crate::CompletionItemKind::Role),
193- // CompletionAssertion::LabelAndKind(
194- // "test_login".into(),
195- // crate::CompletionItemKind::Role,
196- // ),
197- // CompletionAssertion::LabelAndKind(
198- // "test_nologin".into(),
199- // crate::CompletionItemKind::Role,
200- // ),
201- // ],
202- // None,
203- // &pool,
204- // )
205- // .await;
182+ assert_complete_results (
183+ format ! (
184+ r#"grant select
185+ on table public.users
186+ to {}"# ,
187+ CURSOR_POS
188+ )
189+ . as_str ( ) ,
190+ vec ! [
191+ // recognizing already mentioned roles is not supported for now
192+ CompletionAssertion :: LabelAndKind ( "owner" . into( ) , crate :: CompletionItemKind :: Role ) ,
193+ CompletionAssertion :: LabelAndKind (
194+ "test_login" . into( ) ,
195+ crate :: CompletionItemKind :: Role ,
196+ ) ,
197+ CompletionAssertion :: LabelAndKind (
198+ "test_nologin" . into( ) ,
199+ crate :: CompletionItemKind :: Role ,
200+ ) ,
201+ ] ,
202+ None ,
203+ & pool,
204+ )
205+ . await ;
206206
207- // assert_complete_results(
208- // format!(
209- // r#"grant select
210- // on table public.users
211- // to owner, {}"#,
212- // CURSOR_POS
213- // )
214- // .as_str(),
215- // vec![
216- // // recognizing already mentioned roles is not supported for now
217- // CompletionAssertion::LabelAndKind("owner".into(), crate::CompletionItemKind::Role),
218- // CompletionAssertion::LabelAndKind(
219- // "test_login".into(),
220- // crate::CompletionItemKind::Role,
221- // ),
222- // CompletionAssertion::LabelAndKind(
223- // "test_nologin".into(),
224- // crate::CompletionItemKind::Role,
225- // ),
226- // ],
227- // None,
228- // &pool,
229- // )
230- // .await;
207+ assert_complete_results (
208+ format ! (
209+ r#"grant select
210+ on table public.users
211+ to owner, {}"# ,
212+ CURSOR_POS
213+ )
214+ . as_str ( ) ,
215+ vec ! [
216+ // recognizing already mentioned roles is not supported for now
217+ CompletionAssertion :: LabelAndKind ( "owner" . into( ) , crate :: CompletionItemKind :: Role ) ,
218+ CompletionAssertion :: LabelAndKind (
219+ "test_login" . into( ) ,
220+ crate :: CompletionItemKind :: Role ,
221+ ) ,
222+ CompletionAssertion :: LabelAndKind (
223+ "test_nologin" . into( ) ,
224+ crate :: CompletionItemKind :: Role ,
225+ ) ,
226+ ] ,
227+ None ,
228+ & pool,
229+ )
230+ . await ;
231231
232232 assert_complete_results (
233233 format ! ( r#"grant {} to owner"# , CURSOR_POS ) . as_str ( ) ,
0 commit comments