Update Laravel Pint
This commit is contained in:
parent
8d93a5ac7a
commit
7ee5bb00ba
13 changed files with 78 additions and 78 deletions
|
@ -18,7 +18,7 @@ class AdminHomeControllerTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin');
|
||||
->get('/admin');
|
||||
|
||||
$response->assertViewIs('admin.welcome');
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class ArticlesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/blog');
|
||||
->get('/admin/blog');
|
||||
$response->assertSeeText('Select article to edit:');
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class ArticlesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/blog/create');
|
||||
->get('/admin/blog/create');
|
||||
$response->assertSeeText('Title (URL)');
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ class ArticlesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/blog', [
|
||||
'title' => 'Test Title',
|
||||
'main' => 'Article content',
|
||||
]);
|
||||
->post('/admin/blog', [
|
||||
'title' => 'Test Title',
|
||||
'main' => 'Article content',
|
||||
]);
|
||||
$this->assertDatabaseHas('articles', ['title' => 'Test Title']);
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,10 @@ class ArticlesTest extends TestCase
|
|||
$file = new UploadedFile($path, 'article.md', 'text/plain', null, true);
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/blog', [
|
||||
'title' => 'Uploaded Article',
|
||||
'article' => $file,
|
||||
]);
|
||||
->post('/admin/blog', [
|
||||
'title' => 'Uploaded Article',
|
||||
'article' => $file,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('articles', [
|
||||
'title' => 'Uploaded Article',
|
||||
|
@ -82,7 +82,7 @@ class ArticlesTest extends TestCase
|
|||
]);
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/blog/' . $article->id . '/edit');
|
||||
->get('/admin/blog/' . $article->id . '/edit');
|
||||
$response->assertSeeText('This is *my* new blog. It uses `Markdown`.');
|
||||
}
|
||||
|
||||
|
@ -93,11 +93,11 @@ class ArticlesTest extends TestCase
|
|||
$article = Article::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/blog/' . $article->id, [
|
||||
'_method' => 'PUT',
|
||||
'title' => 'My New Blog',
|
||||
'main' => 'This article has been edited',
|
||||
]);
|
||||
->post('/admin/blog/' . $article->id, [
|
||||
'_method' => 'PUT',
|
||||
'title' => 'My New Blog',
|
||||
'main' => 'This article has been edited',
|
||||
]);
|
||||
$this->assertDatabaseHas('articles', [
|
||||
'title' => 'My New Blog',
|
||||
'main' => 'This article has been edited',
|
||||
|
@ -111,9 +111,9 @@ class ArticlesTest extends TestCase
|
|||
$article = Article::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/blog/' . $article->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
->post('/admin/blog/' . $article->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
$this->assertSoftDeleted('articles', [
|
||||
'title' => $article->title,
|
||||
]);
|
||||
|
|
|
@ -19,7 +19,7 @@ class ClientsTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/clients');
|
||||
->get('/admin/clients');
|
||||
$response->assertSeeText('Clients');
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ class ClientsTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/clients/create');
|
||||
->get('/admin/clients/create');
|
||||
$response->assertSeeText('New Client');
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ class ClientsTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/clients', [
|
||||
'client_name' => 'Micropublish',
|
||||
'client_url' => 'https://micropublish.net',
|
||||
]);
|
||||
->post('/admin/clients', [
|
||||
'client_name' => 'Micropublish',
|
||||
'client_url' => 'https://micropublish.net',
|
||||
]);
|
||||
$this->assertDatabaseHas('clients', [
|
||||
'client_name' => 'Micropublish',
|
||||
'client_url' => 'https://micropublish.net',
|
||||
|
@ -58,7 +58,7 @@ class ClientsTest extends TestCase
|
|||
]);
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/clients/' . $client->id . '/edit');
|
||||
->get('/admin/clients/' . $client->id . '/edit');
|
||||
$response->assertSee('https://jbl5.dev/notes/new');
|
||||
}
|
||||
|
||||
|
@ -69,11 +69,11 @@ class ClientsTest extends TestCase
|
|||
$client = MicropubClient::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/clients/' . $client->id, [
|
||||
'_method' => 'PUT',
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
'client_name' => 'JBL5dev',
|
||||
]);
|
||||
->post('/admin/clients/' . $client->id, [
|
||||
'_method' => 'PUT',
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
'client_name' => 'JBL5dev',
|
||||
]);
|
||||
$this->assertDatabaseHas('clients', [
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
'client_name' => 'JBL5dev',
|
||||
|
@ -89,9 +89,9 @@ class ClientsTest extends TestCase
|
|||
]);
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/clients/' . $client->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
->post('/admin/clients/' . $client->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
$this->assertDatabaseMissing('clients', [
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
]);
|
||||
|
|
|
@ -21,7 +21,7 @@ class LikesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/likes');
|
||||
->get('/admin/likes');
|
||||
$response->assertSeeText('Likes');
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class LikesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/likes/create');
|
||||
->get('/admin/likes/create');
|
||||
$response->assertSeeText('New Like');
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ class LikesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/likes', [
|
||||
'like_url' => 'https://example.com',
|
||||
]);
|
||||
->post('/admin/likes', [
|
||||
'like_url' => 'https://example.com',
|
||||
]);
|
||||
$this->assertDatabaseHas('likes', [
|
||||
'url' => 'https://example.com',
|
||||
]);
|
||||
|
@ -58,7 +58,7 @@ class LikesTest extends TestCase
|
|||
$like = Like::factory()->create();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->get('/admin/likes/' . $like->id . '/edit');
|
||||
->get('/admin/likes/' . $like->id . '/edit');
|
||||
$response->assertSee('Edit Like');
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,10 @@ class LikesTest extends TestCase
|
|||
$like = Like::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/likes/' . $like->id, [
|
||||
'_method' => 'PUT',
|
||||
'like_url' => 'https://example.com',
|
||||
]);
|
||||
->post('/admin/likes/' . $like->id, [
|
||||
'_method' => 'PUT',
|
||||
'like_url' => 'https://example.com',
|
||||
]);
|
||||
$this->assertDatabaseHas('likes', [
|
||||
'url' => 'https://example.com',
|
||||
]);
|
||||
|
@ -88,9 +88,9 @@ class LikesTest extends TestCase
|
|||
$user = User::factory()->make();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/admin/likes/' . $like->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
->post('/admin/likes/' . $like->id, [
|
||||
'_method' => 'DELETE',
|
||||
]);
|
||||
$this->assertDatabaseMissing('likes', [
|
||||
'url' => $url,
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue