mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
CE-609 Remove tests for now-removed /api/oauth/token paths
This commit is contained in:
@ -51,7 +51,6 @@ import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldType;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
|
||||
import com.kingsrook.qqq.backend.core.modules.authentication.implementations.FullyAnonymousAuthenticationModule;
|
||||
import com.kingsrook.qqq.backend.core.utils.SleepUtils;
|
||||
import com.kingsrook.qqq.backend.core.utils.StringUtils;
|
||||
import com.kingsrook.qqq.backend.javalin.QJavalinImplementation;
|
||||
@ -1386,56 +1385,6 @@ class QJavalinApiHandlerTest extends BaseTest
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Test
|
||||
void testAuthorizeNoParams()
|
||||
{
|
||||
///////////////
|
||||
// no params //
|
||||
///////////////
|
||||
HttpResponse<String> response = Unirest.post(BASE_URL + "/api/oauth/token").asString();
|
||||
assertEquals(HttpStatus.BAD_REQUEST_400, response.getStatus());
|
||||
assertThat(response.getBody()).contains("client_id");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Test
|
||||
void testAuthorizeOneParam()
|
||||
{
|
||||
///////////////
|
||||
// no params //
|
||||
///////////////
|
||||
HttpResponse<String> response = Unirest.post(BASE_URL + "/api/oauth/token")
|
||||
.body("client_id=XXXXXXXXXX").asString();
|
||||
assertEquals(HttpStatus.BAD_REQUEST_400, response.getStatus());
|
||||
assertThat(response.getBody()).contains("client_secret");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Test
|
||||
void testAuthorizeAllParams()
|
||||
{
|
||||
///////////////
|
||||
// no params //
|
||||
///////////////
|
||||
HttpResponse<String> response = Unirest.post(BASE_URL + "/api/oauth/token")
|
||||
.body("client_id=XXXXXXXXXX&client_secret=YYYYYYYYYYYY").asString();
|
||||
assertEquals(HttpStatus.OK_200, response.getStatus());
|
||||
assertThat(response.getBody()).isEqualTo(FullyAnonymousAuthenticationModule.TEST_ACCESS_TOKEN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
|
Reference in New Issue
Block a user