Blame view
tests/integration/Forum/CreateDiscussion/PostTitleLengthIsLimitedTest.php
709 Bytes
e77200db5 Initial commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<?php namespace FootyRoom\Tests; class PostTitleLengthIsLimitedTest extends TestCase { use SetsUpFixtures; public function testNotAllowedToPostLengthyTitle() { $faker = \Faker\Factory::create(); $data = [ 'title' => $faker->sentence(50), 'content' => $faker->paragraph().'http://google.com', 'category' => 53, ]; $user = factory('FootyRoom\User\User')->make(['user_id' => 1]); $response = $this->actingAs($user)->call('POST', '/forum/discussions', $data); $this->assertEquals(500, $response->status()); $this->assertContains('Post title is limited 120 characters.', $response->getContent()); } } |