Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
rerun ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alexZ7000 committed Oct 15, 2024
1 parent 59b3c3e commit 1628e5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ spring.datasource.password=${DATABASE_PASSWORD}

spring.jpa.hibernate.ddl-auto=${JPA_DDL}
spring.jpa.open-in-view=${JPA_OPEN_IN_VIEW}
spring.jpa.show-sql=${JPA_SHOW_SQL}
spring.jpa.show-sql=${JPA_SHOW_SQL}
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.comerce.integration.controller;

import com.example.comerce.core.dto.AddressDTO;
import com.example.comerce.core.dto.OrderDTO;
import com.example.comerce.core.dto.UserDTO;
import com.example.comerce.core.entities.User;
import com.example.comerce.core.services.UserService;
Expand All @@ -17,9 +18,7 @@
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;

import java.util.Collections;
import java.util.Optional;
import java.util.UUID;
import java.util.*;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
Expand Down Expand Up @@ -106,6 +105,12 @@ public void testCreateUser() throws Exception {
address.setState("Estado Exemplo");
userDTO.setAddress(address);

final OrderDTO order = new OrderDTO();
order.setDate(new Date());
order.setDiscount(10.0);
order.setTotal_price(100.0);
userDTO.setOrders(List.of(order));

final User user = userDTO.toEntity();
user.setUser_id(UUID.randomUUID());

Expand Down

0 comments on commit 1628e5f

Please sign in to comment.