操作
Task(タスク) #2908
完了Shouta Kashiwagi さんが12年以上前に更新
- 題名 を JSON APIのユニットテストを作成する から JSON APIのユニットテストを作成する(正常系) に変更
異常系テストについては別チケットで対応します.
正常系については成功しているため閉じます.
正常系テスト: 5,6, 13, 17, 22, 28, 30, 31, 32, 34, 38, 41, 42
ok 1 - [apiKey] JSON API is not enabled. not ok 2 - [apiKey] apiKey not specified # Failed test (./test/unit/api/opJsonApiTest.php at line 28) # got: 200 # expected: 401 not ok 3 - [apiKey] empty apiKey # Failed test (./test/unit/api/opJsonApiTest.php at line 31) # got: 200 # expected: 401 not ok 4 - [apiKey] invalid apiKey # Failed test (./test/unit/api/opJsonApiTest.php at line 34) # got: 200 # expected: 401 ok 5 - [apiKey] valid apiKey ok 6 - [activity/search.json] valid request ok 7 - [activity/search.json] invalid parameter not ok 8 - [activity/search.json] target => friend is valid parameter. # Failed test (./test/unit/api/opJsonApiTest.php at line 50) # got: 500 # expected: 200 ok 9 - [activity/search.json] target => community parameter requires target_id parameter. not ok 10 - [activity/search.json] target => community is valid parameter. # Failed test (./test/unit/api/opJsonApiTest.php at line 56) # got: 404 # expected: 200 not ok 11 - [activity/search.json] activiy_id parameter is not set. # Failed test (./test/unit/api/opJsonApiTest.php at line 59) # got: 200 # expected: 400 not ok 12 - [activity/search.json] activity_id => hogefuga is invalid parameter # Failed test (./test/unit/api/opJsonApiTest.php at line 62) # got: 200 # expected: 400 ok 13 - [activity/search.json] activity_id => 1 is valid parameter not ok 14 - [activity/search.json] member_id parameter is valid parameter. # Failed test (./test/unit/api/opJsonApiTest.php at line 68) # got: 500 # expected: 200 ok 15 - [activity/search.json] max_id and since_id parameter is valid parameter. ok 16 - [activity/post.json] body parameter is required. ok 17 - [activity/post.json] body => hogefuga parameter should be posted. not ok 18 - [activity/post.json] body => (space) parameter should be rejected. # Failed test (./test/unit/api/opJsonApiTest.php at line 85) # got: 200 # expected: 400 not ok 19 - [activity/post.json] body => (tabs) parameter should be rejected. # Failed test (./test/unit/api/opJsonApiTest.php at line 88) # got: 200 # expected: 400 ok 20 - [activity/post.json] target parameter (except: 'community') should not be set. ok 21 - [activity/post.json] target_id parameter is required. ok 22 - [activity/post.json] target => community and target_id => 1 parameter should be posted. ok 23 - [activity/delete.json] activity_id parameter is required. not ok 24 - [activity/delete.json] activity_id => 1 is valid parameter. # Failed test (./test/unit/api/opJsonApiTest.php at line 108) # got: 403 # expected: 200 not ok 25 - [activity/delete.json] id => 2 parameter is invalid parameter (not found). # Failed test (./test/unit/api/opJsonApiTest.php at line 111) # got: 403 # expected: 404 ok 26 - [activity/delete.json] id => 3 activity data is not allowed to delete. ok 27 - [member/search.json] target => friend parameter is invalid. ok 28 - [member/search.json] target => friend and target_id parameter is valid. ok 29 - [member/search.json] target => community parameter is invalid. ok 30 - [member/search.json] target => community and target_id parameter is valid. ok 31 - [member/search.json] target => dummy parameter id valid. ok 32 - [community/search.json] keyword => dummy parameter is valid. ok 33 - [community/member.json] community_id parameter is required. ok 34 - [community/member.json] community_id => 1 parameter is valid. ok 35 - [community/join.json] community_id parameter is required. ok 36 - [community/join.json] community_id => 10000 does not exist. not ok 37 - [community/join.json] community_id => 1 is already joined. # Failed test (./test/unit/api/opJsonApiTest.php at line 157) # got: 200 # expected: 400 ok 38 - [community/join.json] community_id => 2 parameter is valid. not ok 39 - [community/join.json] community_id => 2 and leave => true parameter is valid. # Failed test (./test/unit/api/opJsonApiTest.php at line 163) # got: 500 # expected: 200 not ok 40 - [community/join.json] This member cannot leave this community (community_id => 1) # Failed test (./test/unit/api/opJsonApiTest.php at line 166) # got: 200 # expected: 400 ok 41 - [push/count.json] valid. ok 42 - [push/search.json] valid.
Shouta Kashiwagi さんが12年以上前に更新
- ステータス を New(新規) から Pending Review(レビュー待ち) に変更
- 進捗率 を 0 から 50 に変更
更新履歴 e5b477937b98b4236daa8c5ad17a2d61934c5cc3 で適用されました。
Yuya Watanabe さんが12年以上前に更新
note-2 から 正常系だけのテスト結果を抽出したもの
正常系テスト: 5,6, 13, 17, 22, 28, 30, 31, 32, 34, 38, 41, 42
ok 5 - [apiKey] valid apiKey ok 6 - [activity/search.json] valid request ok 13 - [activity/search.json] activity_id => 1 is valid parameter ok 17 - [activity/post.json] body => hogefuga parameter should be posted. ok 22 - [activity/post.json] target => community and target_id => 1 parameter should be posted. ok 28 - [member/search.json] target => friend and target_id parameter is valid. ok 30 - [member/search.json] target => community and target_id parameter is valid. ok 31 - [member/search.json] target => dummy parameter id valid. ok 32 - [community/search.json] keyword => dummy parameter is valid. ok 34 - [community/member.json] community_id => 1 parameter is valid. ok 38 - [community/join.json] community_id => 2 parameter is valid. ok 41 - [push/count.json] valid. ok 42 - [push/search.json] valid.
Yuya Watanabe さんが12年以上前に更新
- ステータス を Pending Review(レビュー待ち) から Fixed(完了) に変更
- 進捗率 を 50 から 100 に変更
正常系については問題ないとし,実行もできているものとしてチケットをクローズします.
操作