Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Reorganize and cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alariva committed Nov 25, 2015
1 parent 121b999 commit 8693918
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 110 deletions.
3 changes: 3 additions & 0 deletions integrated.json
@@ -0,0 +1,3 @@
{
"baseUrl": "http://localhost:8000"
}
17 changes: 0 additions & 17 deletions tests/BootstrapperTest.php

This file was deleted.

7 changes: 2 additions & 5 deletions tests/TestCase.php
@@ -1,12 +1,9 @@
<?php

use Illuminate\Foundation\Testing\DatabaseTransactions;

class TestCase extends Illuminate\Foundation\Testing\TestCase
{
use DatabaseTransactions;

protected $baseUrl = 'http://localhost';

/**
* Creates the application.
*
Expand All @@ -28,7 +25,7 @@ public function prepareForTests()

public function setupDatabase()
{
# Artisan::call('migrate');
# Artisan::call('migrate:reset');
# Artisan::call('db:seed', array('--class'=>'TestingDatabaseSeeder'));
}

Expand Down
37 changes: 0 additions & 37 deletions tests/UserRegistrationTest.php

This file was deleted.

17 changes: 0 additions & 17 deletions tests/WebTest.php

This file was deleted.

21 changes: 0 additions & 21 deletions tests/integration/ExampleTest.php

This file was deleted.

37 changes: 37 additions & 0 deletions tests/integration/UserRegistrationProcessTest.php
@@ -0,0 +1,37 @@
<?php

use Laracasts\Integrated\Extensions\Selenium as IntegrationTest;
use Illuminate\Foundation\Testing\DatabaseTransactions;

class UserRegistrationProcessTest extends IntegrationTest
{
use DatabaseTransactions;

# protected $baseUrl = 'http://localhost:8000';

/** @test */
public function testRegistrationSuccess()
{
$this->visit('/lang/en_US.utf8')
->visit('/auth/register')
->type('John', '#name')
->type('test@timegrid.io', '#email')
->type('password', '#password')
->type('password', '#password_confirmation')
->press('Register')
->see('I run a business');
}

/** @test */
public function testRegistrationPasswordMissmatch()
{
$this->visit('/lang/en_US.utf8')
->visit('/auth/register')
->type('John', '#name')
->type('test@timegrid.io', '#email')
->type('password', '#password')
->type('wrong', '#password_confirmation')
->press('Register')
->see('Please confirm your password correctly');
}
}
13 changes: 0 additions & 13 deletions tests/unit/ServiceUnitTest.php

This file was deleted.

0 comments on commit 8693918

Please sign in to comment.