From c9690ce61fdab0f89f97eb6cf241c84c7990bd3c Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Mon, 11 Nov 2024 15:36:54 +0000 Subject: [PATCH] Update the tests --- src/resources/views/layouts/default.blade.php | 3 +-- tests/Traits/HomeControllerTest.php | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/resources/views/layouts/default.blade.php b/src/resources/views/layouts/default.blade.php index 741f92c4..98669a76 100644 --- a/src/resources/views/layouts/default.blade.php +++ b/src/resources/views/layouts/default.blade.php @@ -6,8 +6,7 @@ {{ \Osiset\ShopifyApp\Util::getShopifyConfig('app_name') }} - + @yield('styles') diff --git a/tests/Traits/HomeControllerTest.php b/tests/Traits/HomeControllerTest.php index 934c3b18..453e4ff7 100644 --- a/tests/Traits/HomeControllerTest.php +++ b/tests/Traits/HomeControllerTest.php @@ -25,10 +25,9 @@ public function testHomeRoute(): void $shop = factory($this->model)->create(['name' => 'shop-name.myshopify.com']); $host = base64_encode($shop->getDomain()->toNative().'/admin'); - $this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host]) + $this->call('get', '/', ['id_token' => $this->buildToken(), 'host' => $host]) ->assertOk() - ->assertSee('apiKey: "'.Util::getShopifyConfig('api_key').'"', false) - ->assertSee("host: \"{$host}\"", false); + ->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false); } public function testHomeRouteHostAdmin(): void @@ -36,9 +35,8 @@ public function testHomeRouteHostAdmin(): void $shop = factory($this->model)->create(['name' => 'shop-name.myshopify.com']); $host = base64_encode('admin.shopify.com/store/shop-name'); - $this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host]) + $this->call('get', '/', ['id_token' => $this->buildToken(), 'host' => $host]) ->assertOk() - ->assertSee('apiKey: "'.Util::getShopifyConfig('api_key').'"', false) - ->assertSee("host: \"{$host}\"", false); + ->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false); } }