check language for deciding which viewer to see

This commit is contained in:
Maren Süwer
2018-10-29 15:57:31 +01:00
parent e67f68c364
commit dd0eda6c4b
4 changed files with 29 additions and 63 deletions

View File

@@ -2,8 +2,7 @@
import fetchMock from "fetch-mock";
import {
getContent,
getLanguage,
getProgrammingLanguage
getLanguage
} from "./SourcecodeViewer";
describe("get content", () => {
@@ -22,21 +21,6 @@ describe("get content", () => {
done();
});
});
it("should return language", done => {
let headers = {
"X-Programming-Language": "JAVA"
};
fetchMock.head("/api/v2" + CONTENT_URL, {
headers
});
getProgrammingLanguage(CONTENT_URL).then(content => {
expect(content.language).toBe("JAVA");
done();
});
});
});
describe("get correct language type", () => {