Car table update (#27)
This commit is contained in:
@@ -222,7 +222,7 @@ describe("UpdatesContext", () => {
|
||||
data-testid="with-bad-data"
|
||||
onClick={async () => {
|
||||
result = await exec(
|
||||
{ package_id: 1, car_ids: [] },
|
||||
{ package_id: 1, vins: [] },
|
||||
TEST_AUTH_OBJECT
|
||||
);
|
||||
}}
|
||||
@@ -233,7 +233,7 @@ describe("UpdatesContext", () => {
|
||||
result = await exec(
|
||||
{
|
||||
package_id: 1,
|
||||
car_ids: [1, 2, 3],
|
||||
vins: ["FISKER123", "FISKER124", "FISKER125"],
|
||||
},
|
||||
TEST_AUTH_OBJECT
|
||||
);
|
||||
@@ -284,7 +284,7 @@ describe("UpdatesContext", () => {
|
||||
checkState("false", "", {
|
||||
id: 1,
|
||||
package_id: 1,
|
||||
car_ids: [1, 2, 3],
|
||||
vins: ["FISKER123", "FISKER124", "FISKER125"],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -125,7 +125,7 @@ const validateCreateCarUpdates = (data) => {
|
||||
throw new Error("Package id required");
|
||||
}
|
||||
|
||||
if (!data.car_ids || data.car_ids.length === 0) {
|
||||
if (!data.vins || data.vins.length === 0) {
|
||||
throw new Error("Car ids required");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user