Ejemplo n.º 1
0
		it('appends the locale to the end end of simple page urls', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/app/', 'en_GB')).toBe('http://acme.com:1337/app/en_GB');
		});
Ejemplo n.º 2
0
		it('appends the locale to the end of page urls that have no folder', function() {
			expect(getLocalizedPageUrl('http://acme.com', 'en_GB')).toBe('http://acme.com/en_GB');
		});
Ejemplo n.º 3
0
		it('appends the locale to the end when the url starts with 80 but is not 80', function() {
			expect(getLocalizedPageUrl('http://acme.com:8080/app/index.html?query=1#anchor', 'en_GB')).toBe('http://acme.com:8080/app/en_GB.html?query=1#anchor');
		});
Ejemplo n.º 4
0
		it('keeps the query string and anchor in the correct order for urls that contain an html suffix', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/app/index.html?query=1#anchor', 'en_GB')).toBe('http://acme.com:1337/app/en_GB.html?query=1#anchor');
		});
Ejemplo n.º 5
0
		it('prepends the locale before the html suffix for urls that contain an html suffix at the root', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/index.html', 'en_GB')).toBe('http://acme.com:1337/en_GB.html');
		});
Ejemplo n.º 6
0
		it('keeps the query string and anchor in the correct order', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/app/?query=1#anchor', 'en_GB')).toBe('http://acme.com:1337/app/en_GB?query=1#anchor');
		});
Ejemplo n.º 7
0
		it('prepends the locale before any query string', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/app/?query=1', 'en_GB')).toBe('http://acme.com:1337/app/en_GB?query=1');
			expect(getLocalizedPageUrl('http://acme.com:1337/app?query=1', 'en_GB')).toBe('http://acme.com:1337/app/en_GB?query=1');
		});
Ejemplo n.º 8
0
		it('prepends the locale before any internal page anchor', function() {
			expect(getLocalizedPageUrl('http://acme.com:1337/app/#anchor', 'en_GB')).toBe('http://acme.com:1337/app/en_GB#anchor');
		});