Skip to content

Commit

Permalink
Update the test to still check for a correct api key
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyon147 committed Nov 12, 2024
1 parent 8f7f81b commit 54b2813
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Traits/HomeControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Auth\AuthManager;
use Osiset\ShopifyApp\Test\TestCase;
use Osiset\ShopifyApp\Util;

class HomeControllerTest extends TestCase
{
Expand All @@ -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
Expand All @@ -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');
}
}

0 comments on commit 54b2813

Please sign in to comment.