Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

テストの改善 #34

Open
3 of 7 tasks
Takeno-hito opened this issue Jul 17, 2021 · 1 comment
Open
3 of 7 tasks

テストの改善 #34

Takeno-hito opened this issue Jul 17, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Takeno-hito
Copy link
Member

Takeno-hito commented Jul 17, 2021

test refactor
主に foreach を何回も使っていた所を直したり (phpunit で回数指定できるから要らない、、)
少しメソッドを分割して統合したり

改善項目

  • expectErrorResponse を使って重複した行を大量に削った → #34 テストの改善 #35
  • testMultipleError 内のケースを dataProvider を利用して分割 → #34 テストの改善 #35
  • テスト内で特段の理由がない限り複数回テストをしないようにする #64
    • すでにデータがあった状態でデータを作っても問題が発生してないかも試したいからよく考えた方がいいのかも?
      • メソッドの中で2回以上getなどを叩く事が想定されてないらしいのでそれに沿った形にする
  • その代わりテストの実行回数を2回以上にする
  • テストケースを作るかも? memo: testwith
  • ステータスコードとエラーコードを同時にチェックできるようなassertionを作る
  • 権限チェック
@Takeno-hito Takeno-hito added the enhancement New feature or request label Jul 17, 2021
@Takeno-hito Takeno-hito self-assigned this Jul 17, 2021
@Takeno-hito Takeno-hito mentioned this issue Jul 18, 2021
6 tasks
@su8ru
Copy link
Member

su8ru commented Sep 17, 2021

ありとあらゆる権限パターン( 2⁴ 通り *1 )での権限チェックを、権限場合分けを手動実装してるしてない問わず全エンドポイントで確認したい

*1: admin, reservation, executive, exhibition を指す。teacher は除外

Takeno-hito added a commit that referenced this issue Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants