diff --git a/tests/Traits/HomeControllerTest.php b/tests/Traits/HomeControllerTest.php index 2b928412..b34b5eb1 100644 --- a/tests/Traits/HomeControllerTest.php +++ b/tests/Traits/HomeControllerTest.php @@ -4,6 +4,7 @@ use Illuminate\Auth\AuthManager; use Osiset\ShopifyApp\Test\TestCase; +use Osiset\ShopifyApp\Util; class HomeControllerTest extends TestCase { @@ -26,7 +27,8 @@ public function testHomeRoute(): void $host = base64_encode($shop->getDomain()->toNative().'/admin'); $this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host]) ->assertOk() - ->assertSee("https://cdn.shopify.com/shopifycloud/app-bridge.js"); + ->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false) + ->assertSee('https://cdn.shopify.com/shopifycloud/app-bridge.js'); } public function testHomeRouteHostAdmin(): void @@ -36,6 +38,7 @@ public function testHomeRouteHostAdmin(): void $host = base64_encode('admin.shopify.com/store/shop-name'); $this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host]) ->assertOk() - ->assertSee("https://cdn.shopify.com/shopifycloud/app-bridge.js"); + ->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false) + ->assertSee('https://cdn.shopify.com/shopifycloud/app-bridge.js'); } }