1 /* Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com
3 * check mkws_config = {} object in browser
7 describe("Check mkws.config object", function () {
8 it("mkws.config exists", function () {
9 expect(mkws.config).not.toBe(undefined);
12 it("mkws.config locale check German", function () {
13 expect(mkws.locale_lang.de.Authors).toMatch(/^Autoren$/);
14 expect(mkws.locale_lang.de.Location).toMatch(/^Ort$/);
16 it("mkws.config locale check Danish", function () {
17 expect(mkws.locale_lang.da.Authors).toMatch(/^Forfattere$/);
18 expect(mkws.locale_lang.da.Location).toMatch(/^Lokation$/);
22 * this is a test if the config value is a boolean JavaScript object: true or false
23 * and nothing else (0, '0', undefined, "false" etc.)
25 it("mkws.config service proxy enabled/disabled", function () {
26 if (mkws.config.use_service_proxy) {
27 expect(mkws.config.use_service_proxy).toBe(true);
29 expect(mkws.config.use_service_proxy).toBe(false);
36 describe("Check pazpar2 config", function () {
37 it("pazpar2_url is a path or an full URL", function () {
38 expect(mkws.config.pazpar2_url).toMatch(/^(\/|https?:\/\/|undefined$)/)
42 describe("Check pazpar2 runtime", function () {
43 it("pazpar2 was successfully initialized", function () {
44 expect(mkws.config.error).toBe(undefined);