From b770e52fe8b099800d3576e9b02ccc4a815a5830 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 16 Mar 2019 09:56:31 +0800 Subject: [PATCH] Fix risky test --- tests/SkinlibControllerTest.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/SkinlibControllerTest.php b/tests/SkinlibControllerTest.php index 7875a3f1..bfd43c83 100644 --- a/tests/SkinlibControllerTest.php +++ b/tests/SkinlibControllerTest.php @@ -811,10 +811,7 @@ class SkinlibControllerTest extends TestCase ); // Without returning score - option(['return_score' => false]); - $uploader->refresh(); - $uploader->score += $texture->size * option('private_score_per_storage'); - $uploader->save(); + option(['return_score' => false, 'private_score_per_storage' => 0]); $texture = factory(Texture::class)->create(['public' => 'false', 'uploader' => $uploader->uid]); $other = factory(User::class)->create(); $other->closet()->attach($texture->tid, ['item_name' => 'a']); @@ -823,10 +820,7 @@ class SkinlibControllerTest extends TestCase 'errno' => 0, 'public' => false, ]); - $this->assertEquals( - $other->score, - User::find($other->uid)->score - ); + $this->assertEquals($other->score, User::find($other->uid)->score); } public function testRename()