From a53743862f437a9231c4e58179026dcf54b739bc Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 15 Jul 2018 18:34:38 +0800 Subject: [PATCH] fix risky test --- tests/SkinlibControllerTest.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/SkinlibControllerTest.php b/tests/SkinlibControllerTest.php index 663e813c..0b1ee51f 100644 --- a/tests/SkinlibControllerTest.php +++ b/tests/SkinlibControllerTest.php @@ -119,21 +119,13 @@ class SkinlibControllerTest extends TestCase 'total_pages' => 1 ]); - // Sort by `likes` - $response = $this->getJson('/skinlib/data?sort=likes'); - try { - $response->assertJson([ - 'items' => $this->serializeTextures($skins->sortByDesc('likes')->values()), + // Sort by `tid` + $this->getJson('/skinlib/data?sort=tid') + ->assertJson([ + 'items' => $this->serializeTextures($skins->sortByDesc('tid')->values()), 'anonymous' => true, 'total_pages' => 1 ]); - } catch (\PHPUnit\Framework\ExpectationFailedException $e) { - $response->assertJson([ - 'items' => $this->serializeTextures($skins->sortBy('name')->sortByDesc('likes')->values()), - 'anonymous' => true, - 'total_pages' => 1 - ]); - } // Search $keyword = str_limit($skins->random()->name, 1, '');