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); }