Advertisement
Guest User

Untitled

a guest
Nov 28th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. public function RegistrarCorrectamente(ApiTester $I) //200
  2. {
  3.  
  4. DB::beginTransaction();
  5. try{
  6. $I->wantTo('Registrarse correctamente');
  7. $I->sendPOST($this->url, [
  8. 'email' => 'tester123@gmail.com',
  9. 'first_name' => 'Prueba4',
  10. 'last_name' => 'Probador',
  11. 'community_id' => 2,
  12. ]);
  13. $I->seeInDatabase('app.users_x_communities', array('email' => 'tester123@gmail.com'));
  14. $I->seeInDatabase('app.users', array('first_name' => 'Prueba4'));
  15.  
  16. /*$this->checkResponseCode($I, HttpCode::OK);*/
  17. $I->seeResponseIsJson();
  18. $I->seeResponseContainsJson(array(
  19. 'estado' => true,
  20. ));
  21. DB::commit();
  22. }
  23. catch(Exception $e) {
  24. DB::commit();
  25. }
  26. }
  27.  
  28. class_name: ApiTester
  29. modules:
  30. enabled:
  31. - HelperApi
  32. - Asserts
  33. - Laravel5
  34. - Db
  35. - REST:
  36. url: http://localhost:8000/api/
  37. depends: Laravel5
  38. config:
  39. Laravel5:
  40. environment_file: .env.testing
  41.  
  42. actor: Tester
  43. paths:
  44. tests: tests
  45. log: tests/_output
  46. data: tests/_data
  47. support: tests/_support
  48. envs: tests/_envs
  49. settings:
  50. bootstrap: _bootstrap.php
  51. colors: false
  52. memory_limit: 1024M
  53. extensions:
  54. enabled:
  55. - CodeceptionExtensionRunFailed
  56. modules:
  57. config:
  58. Db:
  59. dsn: 'pgsql:host=localhost;port=5432;dbname=movers'
  60. user: 'postgres'
  61. password: '1234'
  62.  
  63. APP_ENV=testing
  64. APP_KEY=base64:WRVmtVKixE3/MQ5bcDA3rrEaYqCavwaoleuRkcZtc4w=
  65. APP_DEBUG=true
  66. APP_LOG_LEVEL=debug
  67. APP_URL=http://localhost
  68.  
  69. DB_CONNECTION=pgsql
  70. DB_HOST=127.0.0.1
  71. DB_PORT=5432
  72. DB_DATABASE=movers
  73. DB_USERNAME=postgres
  74. DB_PASSWORD=1234
  75.  
  76. API_VERSION=v1
  77. API_NAME="Movers API"
  78. API_PREFIX=api
  79. API_STANDARDS_TREE=vnd
  80. API_SUBTYPE=movers
  81. API_DEBUG=true
  82.  
  83. CACHE_DRIVER=file
  84. SESSION_DRIVER=file
  85. QUEUE_DRIVER=sync
  86.  
  87. REDIS_HOST=127.0.0.1
  88. REDIS_PASSWORD=null
  89. REDIS_PORT=6379
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement