mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
14 lines
393 B
JavaScript
14 lines
393 B
JavaScript
|
|
// @flow
|
||
|
|
import { createUrl } from "./apiclient";
|
||
|
|
|
||
|
|
test("create url, should not change absolute urls", () => {
|
||
|
|
expect(createUrl("https://www.scm-manager.org")).toBe(
|
||
|
|
"https://www.scm-manager.org"
|
||
|
|
);
|
||
|
|
});
|
||
|
|
|
||
|
|
test("create url, should add prefix for api", () => {
|
||
|
|
expect(createUrl("/users")).toBe("/scm/api/rest/v2/users");
|
||
|
|
expect(createUrl("users")).toBe("/scm/api/rest/v2/users");
|
||
|
|
});
|