update sqlx data, delete user in username_change test

This commit is contained in:
realaravinth 2021-08-12 17:22:41 +05:30
parent a65b1c219c
commit 595e79a014
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
3 changed files with 21 additions and 4 deletions

View file

@ -53,6 +53,19 @@
]
}
},
"2021bc0eb03df51af06b59e2a1efdba231e8f35d9cfb5c5b55241c566b9055ce": {
"query": "UPDATE mcaptcha_users set name = $1\n WHERE name = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text"
]
},
"nullable": []
}
},
"238569a64d7dbd252e3b27204f207e8a8548109717b89495ddf8f9a870c7c75d": {
"query": "UPDATE mcaptcha_config SET name = $1, duration = $2 \n WHERE user_id = (SELECT ID FROM mcaptcha_users WHERE name = $3)\n AND key = $4",
"describe": {

View file

@ -210,8 +210,12 @@ async fn username_update_works() {
{
let data = Data::new().await;
delete_user(NAME, &data).await;
delete_user(NAME2, &data).await;
futures::join!(
delete_user(NAME, &data),
delete_user(NAME2, &data),
delete_user(NAME_CHANGE, &data)
);
}
let _ = register_and_signin(NAME2, EMAIL2, PASSWORD).await;

View file

@ -14,6 +14,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import init from 'mcaptcha-glue';
import * as lib from 'mcaptcha-glue';
export const register = () => init();
export const register = () => lib.init();