- name: "10 movie only ratings in preparation for item prediction check should return a 204" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/ratings' method: 'PUT' body: m765: 1.0 m42: 2.0 m89: 3.0 m91: 4.0 m98: 5.0 m766: 1.0 m43: 2.0 m90: 3.0 m92: 4.0 m99: 5.0 response_expectation: status_code: 204 body: - name: "There should be a prediction for a certain movie item" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 200 body: /^\[{"m\d+":[0-5]\.[05]}\]$/ - name: "There should occure a 404 if a prediction for a certain movie item is requested for an unknown user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 404 body: - name: "10 series only ratings in preparation for item prediction check should return a 204" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/ratings' method: 'PUT' body: s50: 1.0 s51: 2.0 s52: 3.0 s69: 4.0 s70: 5.0 s71: 1.0 s86: 2.0 s87: 3.0 s88: 4.0 s99: 5.0 response_expectation: status_code: 204 body: - name: "There should be a prediction for a certain series item" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/s401' method: 'GET' response_expectation: status_code: 200 body: /^\[{"[s]\d+":[0-5]\.[05]}\]$/ - name: "There should occure a 404 if a prediction for a certain series item is requested for an unknown user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 404 body: - name: "10 mixed movie and series ratings in preparation for item prediction check should return a 204" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/ratings' method: 'PUT' body: m765: 1.0 m42: 2.0 m89: 3.0 m91: 4.0 m98: 5.0 s71: 1.0 s86: 2.0 s87: 3.0 s88: 4.0 s99: 5.0 response_expectation: status_code: 204 body: - name: "There should be a prediction for a certain movie item" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 200 body: /^\[{"m\d+":[0-5]\.[05]}\]$/ - name: "There should be a prediction for a certain series item" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/s440' method: 'GET' response_expectation: status_code: 200 body: /^\[{"s\d+":[0-5]\.[05]}\]$/ - name: "There should occure a 404 if a prediction for a certain movie item is requested for an unknown user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 404 body: - name: "There should occure a 404 if a prediction for a certain series item is requested for an unknown user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/predictions/items/m965' method: 'GET' response_expectation: status_code: 404 body: - name: "There should come out 5 predictions for a multi item predictions request with 5 movies" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){4}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 10 predictions for a multi item predictions request with 10 movies" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 50 predictions for a multi item predictions request with 50 movies" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){49}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 10 paginated predictions for a multi item predictions request with 50 movies and per_page=10 as well as page=1" priority: 3 request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279' parameters: per_page: 10 page: 1 method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should come out another 10 paginated predictions for a multi item predictions request with 50 movies per_page=10 as well as page=2" priority: 3 request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,m6203,m2743,m2284,m18272,m1804,m6188,m7509,m4269,m10354,m17785,m356,m5765,m2161,m3984,m20884,m5393,m4359,m17717,m5336,m11285,m2632,m4391,m4198,m2195,m5279' parameters: per_page: 10 page: 2 method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should return a 404 if multi item predictions are requested for a non existant user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228' method: 'GET' response_expectation: status_code: 404 body: - name: 'Creation of a testuser that does not rate but request predictions should be successful' request: headers: Content-Type: 'application/json' path: '/users/wileecoyote' method: 'PUT' body: username: 'wileecoyote' expires_at: 2011-09-09T22:41:50+00:00 response_expectation: status_code: 201 headers: Last-Modified: /.*/ body: username: 'wileecoyote' - name: "There should be no content as well as a 204 in case a user without ratings requests multi item predictions" request: headers: Content-Type: 'application/json' path: '/users/wileecoyote/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228' method: 'GET' response_expectation: status_code: 204 body: - name: 'Delete the testuser without ratings should be successful' request: path: '/users/wileecoyote' method: 'DELETE' body: {} response_expectation: status_code: 202 - name: 'The testuser without ratings who requested predictions anyway should not exist anymore now' request: path: '/users/wileecoyote' method: 'GET' body: {} response_expectation: status_code: 404 - name: "There should come out 5 predictions for a multi item predictions request with 5 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/s377,s378,s379,s380,s381' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"s\d+":[0-5]\.[05]\},){4}\{"s\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 10 predictions for a multi item predictions request with 10 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/s522,s485,s456,s397,s374,s297,s287,s252,s251,s220' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"s\d+":[0-5]\.[05]\},){9}\{"s\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 50 predictions for a multi item predictions request with 50 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/s459,s460,s462,s464,s465,s469,s473,s475,s477,s481,s489,s492,s495,s498,s503,s506,s507,s508,s510,s514,s516,s537,s532,s531,s528,s523,s522,s485,s456,s397,s374,s297,s287,s252,s251,s220,s211,s207,s197,s137,s119,s96,s94,s58,s44,s36,s286,s371,s72,s578' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"s\d+":[0-5]\.[05]\},){49}\{"s\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 5 predictions for mixed multi item predictions request with 3 movies and 2 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,s377,s378' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){4}\{"[sm]\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 10 predictions for mixed multi item predictions request with 5 movies and 5 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,s522,s485,s456,s397,s374' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){9}\{"[sm]\d+":[0-5]\.[05]\}\]$/ - name: "There should come out 50 predictions for mixed multi item predictions request with 25 movies and 25 series" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/predictions/items/m2336,m4941,m3962,m2659,m3053,m875,m2303,m7051,m6936,m5228,m3147,m2182,m3679,m17909,m4689,m4780,m8454,m1805,m11742,m5974,m4380,m5891,m5833,m10629,m9984,s459,s460,s462,s464,s465,s469,s473,s475,s477,s481,s489,s492,s495,s498,s503,s506,s507,s508,s510,s514,s516,s537,s532,s531,s528' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"[sm]\d+":[0-5]\.[05]\},){49}\{"[sm]\d+":[0-5]\.[05]\}\]$/