--- - name: "9 ratings in preparation for recommendation 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 response_expectation: status_code: 204 body: - name: "10 ratings in preparation for recommendation 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: "With 10 ratings put there should be a lot of recommendations" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/recommendations' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},)*\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should be only 10 recommendations if per_page parameter is set" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/recommendations' method: 'GET' parameters: per_page: 10 response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){9}\{"m\d+":[0-5]\.[05]\}\]$/ - name: "There should occure a 404 if recommendations are requested for a non existing user" request: headers: Content-Type: 'application/json' path: '/users/daisyduck/recommendations' method: 'GET' response_expectation: status_code: 404 body: - name: "There should be less than 2000 recommendations at all otherwise filtering does not apply" request: headers: Content-Type: 'application/json' path: '/users/duffyduck/recommendations' method: 'GET' response_expectation: status_code: 200 body: /^\[(\{"m\d+":[0-5]\.[05]\},){1,1999}\{"m\d+":[0-5]\.[05]\}\]$/