Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ No Windows, confirme que o Java está disponível no `PATH` e execute
| `PATCH` | `/ordens/{id}/status` | Atualiza o status da ordem |
| `DELETE` | `/ordens/{id}` | Exclui uma ordem existente |

O tamanho máximo aceito por página é de 100 registros.

Os status disponíveis são `ABERTA`, `EM_ANDAMENTO`, `CONCLUIDA` e
`CANCELADA`. Para atualizar, envie por exemplo:

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ spring.datasource.password=
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.open-in-view=false

spring.data.web.pageable.max-page-size=100
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
package com.exemplo.ordem_servico;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.env.Environment;

@SpringBootTest
class OrdemServicoApplicationTests {

@Autowired
private Environment environment;

@Test
void contextLoads() {
}

@Test
void deveAplicarLimitesSegurosDeConsulta() {
assertEquals(
"false",
environment.getProperty("spring.jpa.open-in-view"));
assertEquals(
"100",
environment.getProperty(
"spring.data.web.pageable.max-page-size"));
}

}
Loading