-
Notifications
You must be signed in to change notification settings - Fork 4
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
tag機能の追加 #169
base: master
Are you sure you want to change the base?
Conversation
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.
レビューしました
多少冗長になってもエラーチェックはしていくようにしよう
特にmodel.CreateItem
は制約が少し厳しい(同じ名前は登録できない)のでテストが動かなくなる原因になるのでどこでテストが落ちるのかの切り分けにも使える
router/tags_test.go
Outdated
item, _ := model.CreateItem(model.Item{Name: "testPostTags2ItemItem"}) | ||
tag1, _ := model.CreateTag("testPostTags2ItemTag1") | ||
tag2, _ := model.CreateTag("testPostTags2ItemTag2") | ||
tag3, _ := model.CreateTag("testPostTags2ItemTag3") |
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.
エラーチェックした方がいいですね
上でassert := assert.New(t)
して下のやつ消せばOK
router/tags_test.go
Outdated
item, _ := model.CreateItem(model.Item{Name: "testDeleteTagSuccessItem"}) | ||
tag, _ := model.CreateTag("testDeleteTagSuccessTag") |
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.
ここもエラーチェック
router/tags_test.go
Outdated
item, _ := model.CreateItem(model.Item{Name: "testDeleteTagFailItem"}) | ||
tag, _ := model.CreateTag("testDeleteTagFailTag") |
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.
ここもエラーチェック
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:+1:
クライアント側のUIについては今後考えていきましょ〜
#135
タグの作成、付与、削除をついかしました
modelのテストが冗長な気がする