From 0cbbdfc19c0f0edd22a60358f75cfd7d7f8fea6a Mon Sep 17 00:00:00 2001 From: Carolyn Liu Date: Sat, 27 Apr 2024 23:49:57 -0400 Subject: [PATCH] fixed compiler errors --- .../it/storage/sqlsearch/AccountRequestSearchIT.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/it/java/teammates/it/storage/sqlsearch/AccountRequestSearchIT.java b/src/it/java/teammates/it/storage/sqlsearch/AccountRequestSearchIT.java index 3798b170122..ab40aff9cb3 100644 --- a/src/it/java/teammates/it/storage/sqlsearch/AccountRequestSearchIT.java +++ b/src/it/java/teammates/it/storage/sqlsearch/AccountRequestSearchIT.java @@ -14,6 +14,7 @@ import teammates.storage.sqlentity.AccountRequest; import teammates.test.AssertHelper; import teammates.test.TestProperties; +import teammates.common.datatransfer.AccountRequestStatus; /** * SUT: {@link AccountRequestsDb}, @@ -171,13 +172,13 @@ public void testSqlInjectionSearchAccountRequestsInWholeSystem() throws Exceptio } AccountRequest accountRequest = new AccountRequest("test@gmail.com", "name", "institute", AccountRequestStatus.PENDING, "comments"); - accountRequestDb.createAccountRequest(accountRequest); + accountRequestsDb.createAccountRequest(accountRequest); String searchInjection = "institute'; DROP TABLE account_requests; --"; List actualInjection = accountRequestsDb.searchAccountRequestsInWholeSystem(searchInjection); - assertEquals(typicalBundle.accountRequests.size(), actualInjection.size()); + assertEquals(typicalBundle.accountRequests, actualInjection.size()); - AccountRequest actual = accountRequestsDb.getAccountRequest("test@gmail.com", "institute"); + AccountRequest actual = accountRequestsDb.getAccountRequest(accountRequest.getId()); assertEquals(accountRequest, actual); }