forked from mirrors/homebox
feat: user defined currencies (#700)
* basic currency service for loading at runtime * api endpoint for currencies * sort slice before return * remove currency validation * validate using currency service * implement selecting dynamic currency options * bump go version * fix type definition * specify explicit type * change go versions * proper types for assetId * log/return currency error * make case insensative * use ToUpper instead * feat: adding new currencies (#715) * fix: task swag (#710) Co-authored-by: Quoing <pavel.cadersky@mavenir.com> * [feat] Adding new currencies --------- Co-authored-by: quoing <quoing@users.noreply.github.com> Co-authored-by: Quoing <pavel.cadersky@mavenir.com> Co-authored-by: Bradley <41597815+userbradley@users.noreply.github.com> * remove ts file and consoldate new values into json * move flag to options namespace * add env config for currencies * basic documentaion * remove in sync test --------- Co-authored-by: quoing <quoing@users.noreply.github.com> Co-authored-by: Quoing <pavel.cadersky@mavenir.com> Co-authored-by: Bradley <41597815+userbradley@users.noreply.github.com> Former-commit-id: c4b923847a1b695dcddd1b346adcccfd3f3ce706
This commit is contained in:
parent
ce923a5b4c
commit
2b79788fbe
39 changed files with 1226 additions and 328 deletions
|
@ -2,7 +2,6 @@ import { faker } from "@faker-js/faker";
|
|||
import { describe, test, expect } from "vitest";
|
||||
import { factories } from "../factories";
|
||||
import { sharedUserClient } from "../test-utils";
|
||||
import { currencies } from "~~/lib/data/currency";
|
||||
|
||||
describe("first time user workflow (register, login, join group)", () => {
|
||||
test("user should be able to update group", async () => {
|
||||
|
@ -29,20 +28,6 @@ describe("first time user workflow (register, login, join group)", () => {
|
|||
expect(group.currency).toBe("USD");
|
||||
});
|
||||
|
||||
test("currencies should be in sync with backend", async () => {
|
||||
const { client } = await factories.client.singleUse();
|
||||
|
||||
for (const currency of currencies) {
|
||||
const { response, data: group } = await client.group.update({
|
||||
name: faker.person.firstName(),
|
||||
currency: currency.code,
|
||||
});
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
expect(group.currency).toBe(currency.code);
|
||||
}
|
||||
});
|
||||
|
||||
test("user should be able to join create join token and have user signup", async () => {
|
||||
const api = factories.client.public();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { sharedUserClient } from "../test-utils";
|
|||
describe("user should be able to create an item and add an attachment", () => {
|
||||
let increment = 0;
|
||||
/**
|
||||
* useLocatio sets up a location resource for testing, and returns a function
|
||||
* useLocation 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: UserClient): Promise<[LocationOut, () => Promise<void>]> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue