mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 03:25:56 +01:00
16 lines
410 B
JavaScript
16 lines
410 B
JavaScript
// @flow
|
|
import { createUrl } from "./apiclient";
|
|
|
|
describe("create url", () => {
|
|
it("should not change absolute urls", () => {
|
|
expect(createUrl("https://www.scm-manager.org")).toBe(
|
|
"https://www.scm-manager.org"
|
|
);
|
|
});
|
|
|
|
it("should add prefix for api", () => {
|
|
expect(createUrl("/users")).toBe("/api/rest/v2/users");
|
|
expect(createUrl("users")).toBe("/api/rest/v2/users");
|
|
});
|
|
});
|