documentation
[mkws-moved-to-github.git] / test / spec / mkws-config.js
1 /* Copyright (c) 2013 IndexData ApS. http://indexdata.com
2  *
3  * check mkws_config = {} object in browser
4  *
5  */
6
7 describe("Check mkws_config object", function() {
8   it("mkws_config exists", function() {
9     expect(mkws_config).not.toBe(undefined);
10   });
11
12   it("mkws_config service proxy config", function() {
13     expect(mkws_config.service_proxy_url).toBe(undefined);
14   });
15
16   it("mkws_config locale check German", function() {
17     expect(mkws_locale_lang.de.Authors).toMatch(/^Autoren$/);
18     expect(mkws_locale_lang.de.Location).toMatch(/^Ort$/);
19   });
20   it("mkws_config locale check Danish", function() {
21     expect(mkws_locale_lang.da.Authors).toMatch(/^Forfattere$/);
22     expect(mkws_locale_lang.da.Location).toMatch(/^Lokation$/);
23   });
24
25   it("mkws_config service proxy enabled", function() {
26     expect(mkws_config.use_service_proxy).toBe(true);
27   });
28
29 });
30
31
32 describe("Check pazpar2 config", function() {
33   it("pazpar2path is a path or an full URL", function() {
34     expect(pazpar2path).toMatch(/^(\/|http:\/\/)/)
35   });
36
37   it("usesessions false", function() {
38     expect(usesessions).toBe(false);
39   });
40
41   it("my_paz is defined", function() {
42     expect(my_paz).not.toBe(undefined);
43   });
44 });
45
46 describe("Check pazpar2 runtime", function() {
47   it("pazpar2 was successfully initialize", function() {
48     expect(mkws_config.error).toBe(undefined);
49   });
50 });