mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
My Account: Updated and started adding to tests
- Updated existing tests now affected by my-account changes. - Updated some existing tests to more accuractly check the scenario. - Updated some code styling in SocialController. - Fixed redirects for social account flows to fit my-account. - Added test for social account attaching. - Added test for api token redirect handling.
This commit is contained in:
@@ -607,7 +607,7 @@ class ImageTest extends TestCase
|
||||
$this->actingAs($editor);
|
||||
|
||||
$file = $this->getTestProfileImage();
|
||||
$this->call('PUT', '/settings/users/' . $editor->id, [], [], ['profile_image' => $file], []);
|
||||
$this->call('PUT', '/my-account/profile', [], [], ['profile_image' => $file], []);
|
||||
|
||||
$profileImages = Image::where('type', '=', 'user')->where('created_by', '=', $editor->id)->get();
|
||||
$this->assertTrue($profileImages->count() === 1, 'Found profile images does not match upload count');
|
||||
@@ -615,7 +615,7 @@ class ImageTest extends TestCase
|
||||
$imagePath = public_path($profileImages->first()->path);
|
||||
$this->assertTrue(file_exists($imagePath));
|
||||
|
||||
$userDelete = $this->asAdmin()->delete("/settings/users/{$editor->id}");
|
||||
$userDelete = $this->asAdmin()->delete($editor->getEditUrl());
|
||||
$userDelete->assertStatus(302);
|
||||
|
||||
$this->assertDatabaseMissing('images', [
|
||||
|
Reference in New Issue
Block a user