mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
add mockup for content classes
This commit is contained in:
23
scm-ui/src/repos/content/components/Content.test.js
Normal file
23
scm-ui/src/repos/content/components/Content.test.js
Normal file
@@ -0,0 +1,23 @@
|
||||
//@flow
|
||||
import fetchMock from "fetch-mock";
|
||||
import { getContentType } from "./Content";
|
||||
|
||||
describe("get content type", () => {
|
||||
const CONTENT_URL = "/repositories/scmadmin/TestRepo/content/testContent";
|
||||
|
||||
afterEach(() => {
|
||||
fetchMock.reset();
|
||||
fetchMock.restore();
|
||||
});
|
||||
|
||||
xit("should return content", done => {
|
||||
fetchMock.head("/api/v2" + CONTENT_URL, {
|
||||
"Content-Type": "text/plain"
|
||||
});
|
||||
|
||||
getContentType(CONTENT_URL).then(content => {
|
||||
expect(content).toBe("This is a testContent");
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user