Wrote unit tests for the BoardApiController -> create tests
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
committed by
Julius Härtl
parent
bd254fd261
commit
1fe70568cb
@@ -102,11 +102,11 @@ class BoardApiController extends ApiController {
|
||||
*/
|
||||
public function create($title, $color) {
|
||||
|
||||
if ($title === false) {
|
||||
if ($title === false || $title === null) {
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($color === false) {
|
||||
if ($color === false || $color === null) {
|
||||
return new DataResponse('color must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user