小程序用户改用门店登录
This commit is contained in:
@@ -12,7 +12,6 @@ use App\Models\PurchaseOrderModel;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\StoreOrderModel;
|
||||
use App\Models\SupplierModel;
|
||||
use App\Models\UserModel;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
/**
|
||||
@@ -34,7 +33,7 @@ class ExportTest extends ProcurementTestCase
|
||||
$veg = ProductModel::factory()->create(['status' => ProductModel::STATUS_ON, 'category_id' => $vegRoot->id, 'cost_price' => '5.00']);
|
||||
$meat = ProductModel::factory()->create(['status' => ProductModel::STATUS_ON, 'category_id' => $meatRoot->id, 'cost_price' => '20.00']);
|
||||
|
||||
$this->actingAsMiniUser(UserModel::factory()->forStore($store->id)->create());
|
||||
$this->actingAsMiniStore($store);
|
||||
$this->postJson('/mini/order', ['items' => [
|
||||
['product_id' => $veg->id, 'quantity' => 2],
|
||||
['product_id' => $meat->id, 'quantity' => 1],
|
||||
@@ -117,12 +116,12 @@ class ExportTest extends ProcurementTestCase
|
||||
'supplier_id' => $supplierB->id,
|
||||
]);
|
||||
|
||||
$this->actingAsMiniUser(UserModel::factory()->forStore($storeA->id)->create());
|
||||
$this->actingAsMiniStore($storeA);
|
||||
$this->postJson('/mini/order', ['items' => [
|
||||
['product_id' => $veg->id, 'quantity' => 2],
|
||||
['product_id' => $meat->id, 'quantity' => 1],
|
||||
]])->assertJsonPath('success', true);
|
||||
$this->actingAsMiniUser(UserModel::factory()->forStore($storeB->id)->create());
|
||||
$this->actingAsMiniStore($storeB);
|
||||
$this->postJson('/mini/order', ['items' => [
|
||||
['product_id' => $veg->id, 'quantity' => 3],
|
||||
]])->assertJsonPath('success', true);
|
||||
|
||||
Reference in New Issue
Block a user