Fix risky test

This commit is contained in:
Pig Fang 2019-03-16 09:56:31 +08:00
parent fade13cdab
commit b770e52fe8

View File

@ -811,10 +811,7 @@ class SkinlibControllerTest extends TestCase
); );
// Without returning score // Without returning score
option(['return_score' => false]); option(['return_score' => false, 'private_score_per_storage' => 0]);
$uploader->refresh();
$uploader->score += $texture->size * option('private_score_per_storage');
$uploader->save();
$texture = factory(Texture::class)->create(['public' => 'false', 'uploader' => $uploader->uid]); $texture = factory(Texture::class)->create(['public' => 'false', 'uploader' => $uploader->uid]);
$other = factory(User::class)->create(); $other = factory(User::class)->create();
$other->closet()->attach($texture->tid, ['item_name' => 'a']); $other->closet()->attach($texture->tid, ['item_name' => 'a']);
@ -823,10 +820,7 @@ class SkinlibControllerTest extends TestCase
'errno' => 0, 'errno' => 0,
'public' => false, 'public' => false,
]); ]);
$this->assertEquals( $this->assertEquals($other->score, User::find($other->uid)->score);
$other->score,
User::find($other->uid)->score
);
} }
public function testRename() public function testRename()