File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed
app/code/Magento/Theme/etc/frontend
dev/tests/api-functional/testsuite/Magento/Quote/Api Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
<!--
3
3
/**
4
- * Copyright © Magento, Inc. All rights reserved.
5
- * See COPYING.txt for license details .
4
+ * Copyright 2015 Adobe
5
+ * All Rights Reserved .
6
6
*/
7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2016 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
namespace Magento \Quote \Api ;
7
7
@@ -25,6 +25,32 @@ protected function setUp(): void
25
25
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
26
26
}
27
27
28
+ /**
29
+ * @return void
30
+ */
31
+ public function testNotAuthorized (): void
32
+ {
33
+ $ serviceInfo = [
34
+ 'rest ' => [
35
+ 'resourcePath ' => '/V1/carts/mine/estimate-shipping-methods ' ,
36
+ 'httpMethod ' => \Magento \Framework \Webapi \Rest \Request::HTTP_METHOD_POST ,
37
+ 'token ' => null ,
38
+ ]
39
+ ];
40
+
41
+ $ requestData = [
42
+ 'address ' => [
43
+ 'country_id ' => "US " ,
44
+ 'postcode ' => null ,
45
+ 'region ' => null ,
46
+ 'region_id ' => null
47
+ ],
48
+ ];
49
+
50
+ $ this ->expectExceptionMessage ("The consumer isn't authorized to access %resources. " );
51
+ $ this ->_webApiCall ($ serviceInfo , $ requestData );
52
+ }
53
+
28
54
/**
29
55
* @magentoApiDataFixture Magento/SalesRule/_files/cart_rule_free_shipping.php
30
56
* @magentoApiDataFixture Magento/Sales/_files/quote.php
You can’t perform that action at this time.
0 commit comments