-
Notifications
You must be signed in to change notification settings - Fork 68
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
Implement http for user information and enhance test case #159
Implement http for user information and enhance test case #159
Conversation
Sync Forked Repo
Codecov Report
@@ Coverage Diff @@
## development #159 +/- ##
===============================================
- Coverage 39.93% 38.60% -1.34%
===============================================
Files 22 22
Lines 969 1005 +36
===============================================
+ Hits 387 388 +1
- Misses 526 561 +35
Partials 56 56
Continue to review full report at Codecov.
|
f98d4ba
to
3d9d697
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.
請先按照 ISSUE 上面的實作,如果有其他要修改的請另外開 ISSUE 討論。
c128196
to
8086129
Compare
@gogog22510 好像有conflicts 要處理 |
8086129
to
e88fe88
Compare
原本的功能已經有實作了,我照著ISSUE上所描述的,做了修改test case以及logging error的動作 |
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.
我也看到change 0, 讓我研究看看.
!=無法比對map, 但deepequal可以
…On Fri, Apr 9, 2021, 12:15 PM Pichu Chen ***@***.***> wrote:
***@***.**** commented on this pull request.
我現在看到他的 Files changed = 0 ,是我這邊有問題嗎?
[image: 截圖 2021-04-10 上午12 14 17]
<https://user-images.githubusercontent.com/600238/114209862-b1f71600-9991-11eb-843b-dfd2b408d304.png>
------------------------------
In internal/delivery/http/route_users_test.go
<#159 (comment)>
:
> @@ -39,9 +57,9 @@ func TestGetUserInformation(t *testing.T) {
t.Logf("got response %v", rr.Body.String())
responsedData := responsedMap["data"].(map[string]interface{})
- if responsedData["user_id"] != userID {
- t.Errorf("handler returned unexpected body, user_id not match: got %v want userId %v",
- rr.Body.String(), userID)
+ if !reflect.DeepEqual(responsedData, expectedData) {
他這個可以用原本 != 而不是用 DeepEqual 嗎?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#159 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4FGLQMMCNFB7PZOZRUQHTTH4R2LANCNFSM42IHPP6Q>
.
|
但是在寫測試上面,應該是直接把map用key比較會比較確定發生了什麼事? |
9468f86
to
499f837
Compare
改成比對key了 |
499f837
to
eb085cc
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.
LGTM
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
LGTM |
👏 解決掉的 issue / Resolved Issues
📝 相關的 issue / Related Issues
⛏ 變更內容 / Details of Changes