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

テストを導入する #44

Closed
3 tasks done
ittokunvim opened this issue May 14, 2023 · 2 comments · Fixed by #45
Closed
3 tasks done

テストを導入する #44

ittokunvim opened this issue May 14, 2023 · 2 comments · Fixed by #45
Assignees
Labels
enhancement New feature or request

Comments

@ittokunvim
Copy link
Owner

ittokunvim commented May 14, 2023

Why

堅牢なアプリケーションを構築するため

What

以下のようなテストを実装する。

  • APIに特定のリクエストを送った際に、期待した値が返ってくるか
  • ORMに特定の値を渡した際に、期待した値が返ってくるか

ToDo

  • テストを導入する
  • ORMのテストを追加する(書かない)
  • APIのテストを追加する

Etc

以下のURLを参考に実装を行う

@ittokunvim ittokunvim added the enhancement New feature or request label May 14, 2023
@ittokunvim ittokunvim self-assigned this May 14, 2023
ittokunvim added a commit that referenced this issue May 14, 2023
@ittokunvim
Copy link
Owner Author

ルートにtestsディレクトリを作成し、その下にファイルを作成し、関数の上に#[test]を書くことで、cargo testを実行した際にテストされるようだ。

@ittokunvim
Copy link
Owner Author

SeaORMのテストはめちゃくちゃめんどくさそうなので書くのやめます。

理由

SeaQL/sea-orm#830

ittokunvim added a commit that referenced this issue May 15, 2023
ittokunvim added a commit that referenced this issue May 16, 2023
@ittokunvim ittokunvim linked a pull request May 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant