Skip to content

Commit 54b2813

Browse files
committed
Update the test to still check for a correct api key
1 parent 8f7f81b commit 54b2813

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/Traits/HomeControllerTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Auth\AuthManager;
66
use Osiset\ShopifyApp\Test\TestCase;
7+
use Osiset\ShopifyApp\Util;
78

89
class HomeControllerTest extends TestCase
910
{
@@ -26,7 +27,8 @@ public function testHomeRoute(): void
2627
$host = base64_encode($shop->getDomain()->toNative().'/admin');
2728
$this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host])
2829
->assertOk()
29-
->assertSee("https://cdn.shopify.com/shopifycloud/app-bridge.js");
30+
->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false)
31+
->assertSee('https://cdn.shopify.com/shopifycloud/app-bridge.js');
3032
}
3133

3234
public function testHomeRouteHostAdmin(): void
@@ -36,6 +38,7 @@ public function testHomeRouteHostAdmin(): void
3638
$host = base64_encode('admin.shopify.com/store/shop-name');
3739
$this->call('get', '/', ['token' => $this->buildToken(), 'host' => $host])
3840
->assertOk()
39-
->assertSee("https://cdn.shopify.com/shopifycloud/app-bridge.js");
41+
->assertSee('name="shopify-api-key" content="'.Util::getShopifyConfig('api_key').'"', false)
42+
->assertSee('https://cdn.shopify.com/shopifycloud/app-bridge.js');
4043
}
4144
}

0 commit comments

Comments
 (0)