-
Notifications
You must be signed in to change notification settings - Fork 7
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
:feature create user #155
:feature create user #155
Conversation
4bc3a7c
to
f053ff1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review done.
spring/src/test/kotlin/tw/waterballsa/gaas/spring/it/controllers/UserControllerTest.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
@Test | ||
fun givenUserNotLoginAtProxyService_whenUserCreateAnUser_thenUserShouldBeCreatedFail() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto UserCreateAnUser
.contentType(MediaType.APPLICATION_JSON) | ||
.contentType(APPLICATION_JSON) | ||
.content(updateUserRequest.toJson()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- inline
- withJson
.contentType(APPLICATION_JSON) | ||
.content(CreateUserRequest(email).toJson()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
post("/users") | ||
.contentType(APPLICATION_JSON) | ||
.content(CreateUserRequest(email).toJson()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
userRepository.findByEmail(email) | ||
.also { assertThat(it).isNotNull } | ||
.also { assertThat(it!!.nickname).isNotNull() } | ||
.also { assertThat(it!!.identities).isNotNull() } | ||
.also { assertThat(it!!.email).isEqualTo(email) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
宣告一個變數測,這裡用 also 沒有優點
userRepository.findByEmail(email) | ||
.also { assertThat(it).isNull() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto 宣告變數
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why need this change? / Root cause:
Changes made:
Test Scope / Change impact:
Issue
POST /users
API #152