Skip to content

Commit

Permalink
[FEAT] make all url start with https://
Browse files Browse the repository at this point in the history
  • Loading branch information
nogamsung committed Feb 24, 2024
1 parent a0508ed commit b002e01
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class PortfolioUpdateRequest {
@Size(min = 1, max = 10, message = "포트폴리오명은 1~10자만 가능합니다.")
private String portfolioName;

@ApiModelProperty(position = 2, required = true, value = "포트폴리오 URL", example = "github.com/gabojait")
@ApiModelProperty(position = 2, required = true, value = "포트폴리오 URL", example = "https://github.com/gabojait")
@Size(min = 10, max = 1000, message = "포트폴리오 URL은 10~1000자만 가능합니다.")
@Pattern(regexp = "^https\\:\\/\\/.+$", message = "포트폴리오 URL은 'https://'로 시작하는 형식만 가능합니다.")
private String portfolioUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@ApiModel(value = "프로젝트 완료 요청")
public class TeamCompleteRequest {

@ApiModelProperty(position = 1, required = true, value = "완료한 프로젝트 URL", example = "github.com/gabojait")
@ApiModelProperty(position = 1, required = true, value = "완료한 프로젝트 URL", example = "https://github.com/gabojait")
@NotBlank(message = "완료된 프로젝트 URL은 필수 입력입니다.")
private String projectUrl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public enum ErrorCode {
*/
TOKEN_UNAUTHORIZED(FORBIDDEN, "권한이 없는 요청입니다. 로그인 후에 다시 시도 해주세요."),
REQUEST_FORBIDDEN(FORBIDDEN, "권한이 없는 요청입니다."),
SUSPEND_FORBIDDEN(FORBIDDEN, "정지일: START_DATE ~ END_DATE\n사유: REASON"),
SUSPEND_FORBIDDEN(FORBIDDEN, "일시 정지된 계정입니다."),

/**
* 404 Not found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ void givenValid_whenLeaveTeam_thenReturn200() throws Exception {

private TeamCompleteRequest createValidTeamCompleteRequest() {
return TeamCompleteRequest.builder()
.projectUrl("github.com/gabojait")
.projectUrl("https://github.com/gabojait")
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void givenValid_whenInjectProfiles_thenReturn() {
() -> assertThat(portfolios)
.extracting("portfolioName", "portfolioUrl", "media")
.containsExactly(
tuple("깃허브", "github.com/gabojait", Media.LINK)
tuple("깃허브", "https://github.com/gabojait", Media.LINK)
),
() -> assertThat(skills)
.extracting("skillName", "level", "isExperienced")
Expand Down Expand Up @@ -211,7 +211,7 @@ void givenValid_whenInjectCompleteTeams_thenReturn() {
"backendMaxCnt", "frontendMaxCnt", "managerMaxCnt", "projectUrl", "visitedCnt", "isRecruiting",
"isDeleted")
.containsExactly("가볼까잇1", "가볼까잇 프로젝트 설명입니다.", "열정적인 팀원을 구합니다.",
"https://open.kakao.com/o/test", (byte) 5, (byte) 5, (byte) 5, (byte) 5, "github.com/gabojait",
"https://open.kakao.com/o/test", (byte) 5, (byte) 5, (byte) 5, (byte) 5, "https://github.com/gabojait",
0L, false, false),
() -> assertThat(reviews.getData())
.extracting("post")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void givenMyUserId_whenMyFindProfile_thenReturn() {
Team completedTeam = createTeam("가보자잇1");
teamRepository.save(completedTeam);
TeamMember completedTeamMember1 = createTeamMember(user1, completedTeam);
completedTeamMember1.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember1.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember1);

User user2 = createSavedDefaultUser("tester2@gabojait.com","tester2", "테스터이");
Expand All @@ -98,7 +98,7 @@ void givenMyUserId_whenMyFindProfile_thenReturn() {
workRepository.saveAll(List.of(work1, work2));

TeamMember completedTeamMember2 = createTeamMember(user2, completedTeam);
completedTeamMember2.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember2.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember2);

Review review = createReview(completedTeamMember1, completedTeamMember2);
Expand Down Expand Up @@ -211,7 +211,7 @@ void givenOtherUserId_whenFindOtherProfile_thenReturn() {
Team completedTeam = createTeam("가보자잇1");
teamRepository.save(completedTeam);
TeamMember completedTeamMember1 = createTeamMember(user1, completedTeam);
completedTeamMember1.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember1.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember1);

User user2 = createSavedDefaultUser("tester2@gabojait.com","tester2", "테스터이");
Expand All @@ -237,7 +237,7 @@ void givenOtherUserId_whenFindOtherProfile_thenReturn() {
workRepository.saveAll(List.of(work1, work2));

TeamMember completedTeamMember2 = createTeamMember(user2, completedTeam);
completedTeamMember2.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember2.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember2);

Review review = createReview(completedTeamMember1, completedTeamMember2);
Expand Down Expand Up @@ -381,7 +381,7 @@ void givenMyUserId_whenFindOtherProfile_thenReturn() {
Team completedTeam = createTeam("가보자잇1");
teamRepository.save(completedTeam);
TeamMember completedTeamMember1 = createTeamMember(user1, completedTeam);
completedTeamMember1.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember1.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember1);

User user2 = createSavedDefaultUser("tester2@gabojait.com","tester2", "테스터이");
Expand All @@ -407,7 +407,7 @@ void givenMyUserId_whenFindOtherProfile_thenReturn() {
workRepository.saveAll(List.of(work1, work2));

TeamMember completedTeamMember2 = createTeamMember(user2, completedTeam);
completedTeamMember2.complete("github.com/gabojait", LocalDateTime.now());
completedTeamMember2.complete("https://github.com/gabojait", LocalDateTime.now());
teamMemberRepository.save(completedTeamMember2);

Review review = createReview(completedTeamMember1, completedTeamMember2);
Expand Down Expand Up @@ -749,9 +749,9 @@ void givenValid_whenUpdatePortfolios_thenReturn() {
PortfolioUpdateRequest request1 = createPortfolioUpdateRequest(portfolio2.getId(),
portfolio2.getPortfolioName(), portfolio2.getPortfolioUrl(), portfolio2.getMedia().toString());
PortfolioUpdateRequest request2 = createPortfolioUpdateRequest(portfolio3.getId(), "포트폴리오4",
"github.com/gabojait1", Media.FILE.toString());
"https://github.com/gabojait1", Media.FILE.toString());
PortfolioUpdateRequest request3 = createPortfolioUpdateRequest(null, "포트폴리오5",
"github.com/gabojait2", Media.LINK.toString());
"https://github.com/gabojait2", Media.LINK.toString());

List<PortfolioUpdateRequest> requests = new ArrayList<>(List.of(request1, request2, request3));

Expand Down Expand Up @@ -1174,7 +1174,7 @@ private ProfileUpdateRequest createValidProfileUpdateRequest() {
EducationUpdateRequest educationRequest = createEducationUpdateRequest(null, "가보자잇대",
LocalDate.of(2004, 1, 1), null, true);
PortfolioUpdateRequest portfolioRequest = createPortfolioUpdateRequest(null, "포트폴리오",
"github.com/gabojait", Media.LINK.toString());
"https://github.com/gabojait", Media.LINK.toString());
SkillUpdateRequest skillRequest = createSkillUpdateRequest(null, "스킬", true, Level.HIGH.toString());
WorkUpdateRequest workRequest = createWorkUpdateRequest(null, "경력", "경력", LocalDate.of(2004, 1, 1),
LocalDate.of(2005, 1, 1), false);
Expand Down Expand Up @@ -1264,7 +1264,7 @@ private Education createEducation(String institutionName, LocalDate startedAt, U
private Portfolio createPortfolio(String portfolioName, User user) {
return Portfolio.builder()
.portfolioName(portfolioName)
.portfolioUrl("github.com/gabojait")
.portfolioUrl("https://github.com/gabojait")
.media(Media.LINK)
.user(user)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ void givenValid_whenFindAllReviewableTeams_thenReturn() {
Team team3 = createSavedTeam("가보자잇3");

TeamMember teamMember1 = createSavedTeamMember(true, user, team1);
teamMember1.complete("github.com/gabojait1", now.minusWeeks(4).minusSeconds(1));
teamMember1.complete("https://github.com/gabojait1", now.minusWeeks(4).minusSeconds(1));
TeamMember teamMember2 = createSavedTeamMember(true, user, team2);
teamMember2.complete("github.com/gabojait2", now.minusWeeks(4).plusSeconds(1));
teamMember2.complete("https://github.com/gabojait2", now.minusWeeks(4).plusSeconds(1));
TeamMember teamMember3 = createSavedTeamMember(false, user, team3);
teamMember3.incomplete();
teamMemberRepository.saveAll(List.of(teamMember1, teamMember2, teamMember3));
Expand Down Expand Up @@ -101,9 +101,9 @@ void givenValid_whenFindReviewableTeam_thenReturn() {
TeamMember teamMember1 = createSavedTeamMember(true, user1, team);
TeamMember teamMember2 = createSavedTeamMember(false, user2, team);
TeamMember teamMember3 = createSavedTeamMember(false, user3, team);
teamMember1.complete("github.com/gabojait", now);
teamMember2.complete("github.com/gabojait", now);
teamMember3.complete("github.com/gabojait", now);
teamMember1.complete("https://github.com/gabojait", now);
teamMember2.complete("https://github.com/gabojait", now);
teamMember3.complete("https://github.com/gabojait", now);
teamMemberRepository.saveAll(List.of(teamMember1, teamMember2, teamMember3));

// when
Expand Down Expand Up @@ -153,11 +153,11 @@ void givenValid_whenCreateReview_thenReturn() {

Team team = createSavedTeam("가보자잇");
TeamMember teamMember1 = createSavedTeamMember(true, user1, team);
teamMember1.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember1.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
TeamMember teamMember2 = createSavedTeamMember(false, user2, team);
teamMember2.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember2.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
TeamMember teamMember3 = createSavedTeamMember(false, user3, team);
teamMember3.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember3.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMemberRepository.saveAll(List.of(teamMember1, teamMember2, teamMember3));

ReviewCreateManyRequest request = createValidReviewCreateManyRequest(
Expand All @@ -183,11 +183,11 @@ void givenExistingReview_whenCreateReview_thenReturn() {

Team team = createSavedTeam("가보자잇");
TeamMember teamMember1 = createSavedTeamMember(true, user1, team);
teamMember1.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember1.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
TeamMember teamMember2 = createSavedTeamMember(false, user2, team);
teamMember2.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember2.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
TeamMember teamMember3 = createSavedTeamMember(false, user3, team);
teamMember3.complete("github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMember3.complete("https://github.com/gabojait", now.minusWeeks(4).plusSeconds(1));
teamMemberRepository.saveAll(List.of(teamMember1, teamMember2, teamMember3));

createSavedReview(teamMember1, teamMember2);
Expand Down Expand Up @@ -233,13 +233,13 @@ void givenValid_whenFindPageReviews_thenReturn() {

Team team = createSavedTeam("가보자잇");
TeamMember teamMember1 = createSavedTeamMember(true, user1, team);
teamMember1.complete("github.com/gabojait", now);
teamMember1.complete("https://github.com/gabojait", now);
TeamMember teamMember2 = createSavedTeamMember(false, user2, team);
teamMember2.complete("github.com/gabojait", now);
teamMember2.complete("https://github.com/gabojait", now);
TeamMember teamMember3 = createSavedTeamMember(false, user3, team);
teamMember3.complete("github.com/gabojait", now);
teamMember3.complete("https://github.com/gabojait", now);
TeamMember teamMember4 = createSavedTeamMember(false, user4, team);
teamMember4.complete("github.com/gabojait", now);
teamMember4.complete("https://github.com/gabojait", now);
teamMemberRepository.saveAll(List.of(teamMember1, teamMember2, teamMember3, teamMember4));

Review review1 = createSavedReview(teamMember2, teamMember1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ void givenComplete_whenEndProject_thenReturn() {

TeamMember teamMember = createdSavedTeamMember(true, user, team, Position.MANAGER);

String projectUrl = "github.com/gabojait";
String projectUrl = "https://github.com/gabojait";
LocalDateTime completeAt = LocalDateTime.now();

// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ private Education createEducation(User user) {
private Portfolio createPortfolio(User user) {
return Portfolio.builder()
.portfolioName("깃허브")
.portfolioUrl("github.com/gabojait")
.portfolioUrl("https://github.com/gabojait")
.media(Media.LINK)
.user(user)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void givenValid_whenBuilder_thenReturn() {
User user = createDefaultUser("tester", LocalDate.of(1997, 2, 11), LocalDateTime.now());

String portfolioName = "깃허브";
String portfolioUrl = "github.com/gabojait";
String portfolioUrl = "https://github.com/gabojait";
Media media = Media.LINK;

// when
Expand All @@ -41,7 +41,7 @@ void givenValid_whenBuilder_thenReturn() {
void givenValid_whenUpdate_thenReturn() {
// given
User user = createDefaultUser("tester", LocalDate.of(1997, 2, 11), LocalDateTime.now());
Portfolio portfolio = createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user);
Portfolio portfolio = createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user);

String portfolioName = "노션";
String portfolioUrl = "nogamsung.notion.io";
Expand All @@ -60,35 +60,35 @@ private static Stream<Arguments> providerEquals() {
LocalDateTime now = LocalDateTime.now();

User user = createDefaultUser("tester", LocalDate.of(1997, 2, 11), now);
Portfolio portfolio = createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user);
Portfolio portfolio = createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user);

User user1 = createDefaultUser("tester1", LocalDate.of(1997, 2, 11), now);
User user2 = createDefaultUser("tester2", LocalDate.of(1997, 2, 11), now);
Portfolio userPortfolio1 = createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user1);
Portfolio userPortfolio2 = createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user2);
Portfolio userPortfolio1 = createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user1);
Portfolio userPortfolio2 = createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user2);

return Stream.of(
Arguments.of(portfolio, portfolio, true),
Arguments.of(portfolio, new Object(), false),
Arguments.of(
createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user),
true
),
Arguments.of(userPortfolio1, userPortfolio2, false),
Arguments.of(
createPortfolio("깃허브1", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브2", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브1", "https://github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브2", "https://github.com/gabojait", Media.LINK, user),
false
),
Arguments.of(
createPortfolio("깃허브", "github.com/gabojait1", Media.LINK, user),
createPortfolio("깃허브", "github.com/gabojait2", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait1", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait2", Media.LINK, user),
false
),
Arguments.of(
createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "github.com/gabojait", Media.FILE, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.FILE, user),
false
)
);
Expand All @@ -109,13 +109,13 @@ private static Stream<Arguments> providerHashCode() {

return Stream.of(
Arguments.of(
createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브", "https://github.com/gabojait", Media.LINK, user),
true
),
Arguments.of(
createPortfolio("깃허브1", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브2", "github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브1", "https://github.com/gabojait", Media.LINK, user),
createPortfolio("깃허브2", "https://github.com/gabojait", Media.LINK, user),
false
)
);
Expand Down
Loading

0 comments on commit b002e01

Please sign in to comment.