Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix #363

Merged
merged 8 commits into from
Sep 21, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.now.naaga.player.domain.Player;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface PlayerRepository extends JpaRepository<Player, Long> {

Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ spring:

spring:
config:
import: classpath:security/application-prod.yml
import: classpath:security/application-local.yml
activate:
on-profile: prod
on-profile: local
2 changes: 1 addition & 1 deletion backend/src/main/resources/security
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.now.naaga.game.domain.Game;
import com.now.naaga.game.domain.Hint;
import com.now.naaga.game.exception.GameException;
import com.now.naaga.member.domain.Member;
import com.now.naaga.place.domain.Place;
import java.time.LocalDateTime;
import org.junit.jupiter.api.DisplayNameGeneration;
Expand All @@ -26,10 +27,13 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.transaction.annotation.Transactional;

@SuppressWarnings("NonAsciiCharacters")
@DisplayNameGeneration(ReplaceUnderscores.class)
@Sql("/truncate.sql")

@ActiveProfiles("test")
@SpringBootTest
class HintServiceTest {

Expand All @@ -42,6 +46,7 @@ class HintServiceTest {
@Autowired
private PlaceBuilder placeBuilder;

@Transactional
@Test
void 힌트를_생성한다() {
// given
Expand All @@ -61,6 +66,9 @@ class HintServiceTest {
// when
final Hint actual = hintService.createHint(createHintCommand);

place.getRegisteredPlayer().getMember();
game.getPlayer().getMember();

// then
final Hint expected = new Hint(서울_좌표,
Direction.SOUTH,
Expand Down