forked from mirrors/homebox
api refactor / registration tests
This commit is contained in:
parent
a67316a889
commit
505099ee26
12 changed files with 120 additions and 33 deletions
|
@ -1,7 +1,7 @@
|
|||
import { describe, test, expect } from "vitest";
|
||||
import { LocationOut } from "../../types/data-contracts";
|
||||
import { AttachmentTypes } from "../../types/non-generated";
|
||||
import { UserApi } from "../../user";
|
||||
import { UserClient } from "../../user";
|
||||
import { sharedUserClient } from "../test-utils";
|
||||
|
||||
describe("user should be able to create an item and add an attachment", () => {
|
||||
|
@ -10,7 +10,7 @@ describe("user should be able to create an item and add an attachment", () => {
|
|||
* useLocatio sets up a location resource for testing, and returns a function
|
||||
* that can be used to delete the location from the backend server.
|
||||
*/
|
||||
async function useLocation(api: UserApi): Promise<[LocationOut, () => Promise<void>]> {
|
||||
async function useLocation(api: UserClient): Promise<[LocationOut, () => Promise<void>]> {
|
||||
const { response, data } = await api.locations.create({
|
||||
name: `__test__.location.name_${increment}`,
|
||||
description: `__test__.location.description_${increment}`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue