mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
fix the info log messages related to Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]
29 lines
1.2 KiB
Java
29 lines
1.2 KiB
Java
package org.alfresco.rest.auth;
|
|
|
|
import org.alfresco.rest.RestTest;
|
|
import org.alfresco.rest.exception.JsonToModelConversionException;
|
|
import org.alfresco.rest.model.RestTicketBodyModel;
|
|
import org.alfresco.rest.model.RestTicketModel;
|
|
import org.alfresco.utility.model.TestGroup;
|
|
import org.alfresco.utility.testrail.ExecutionType;
|
|
import org.alfresco.utility.testrail.annotation.TestRail;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.testng.annotations.Test;
|
|
|
|
public class AuthTests extends RestTest
|
|
{
|
|
@TestRail(section = { TestGroup.REST_API, TestGroup.AUTH }, executionType = ExecutionType.SANITY, description = "Verify TICKET is returned on admin user")
|
|
@Test(groups = { TestGroup.REST_API, TestGroup.SANITY })
|
|
public void adminShouldGetTicketBody() throws JsonToModelConversionException, Exception
|
|
{
|
|
RestTicketBodyModel ticketBody = new RestTicketBodyModel();
|
|
ticketBody.setUserId("admin");
|
|
ticketBody.setPassword("admin");
|
|
|
|
RestTicketModel ticketReturned = restClient.authenticateUser(dataContent.getAdminUser()).withAuthAPI().createTicket(ticketBody);
|
|
|
|
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
|
ticketReturned.assertThat().field("id").contains("TICKET_");
|
|
}
|
|
|
|
} |