class TestSiteUrl
Public Instance Methods
test_get_page_title()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 107 def test_get_page_title site = @site page = site.create_new t_without_testmode { eq '1 - example.com/test', site.get_page_title('1') } siteconfig = site.create('_SiteConfig') siteconfig.store(":page_title_first:true\n") t_without_testmode { eq '1 - example.com/test', site.get_page_title('1') } siteconfig.store(":page_title_first:false\n") t_without_testmode { eq 'example.com/test - 1', site.get_page_title('1') } end
test_https()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 157 def test_https site = @site page = site.create_new siteconfig = site.create('_SiteConfig') siteconfig.store(":siteurl:https://example.net/\n") eq 'https://example.net', site.host_url eq 'https://example.net/', site.site_url eq 'https://example.net/1.html', site.page_url('1') eq 'test@q.example.com', site.ml_address # FIXME: Umm. siteconfig.add(":siteml:info@example.net\n") eq 'info@example.net', site.ml_address t_without_testmode { eq 'https://example.net', site.title eq '1 - https://example.net', site.get_page_title('1') } end
test_url_example_org_with_path()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 174 def test_url_example_org_with_path t_with_path { site = @site page = site.create_new eq 'http://www.example.org', site.host_url eq 'http://www.example.org/qwik/test/', site.site_url eq 'http://www.example.org/qwik/test/1.html', site.page_url('1') eq 'test@q.example.com', site.ml_address t_without_testmode { eq 'www.example.org/qwik/test', site.title eq '1 - www.example.org/qwik/test', site.get_page_title('1') } } end
test_url_siteurl()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 140 def test_url_siteurl page = @site.create_new t_with_siteurl { eq 'http://example.org', @site.host_url eq 'http://example.org/q/', @site.site_url eq 'http://example.org/q/1.html', @site.page_url('1') eq 'test@q.example.com', @site.ml_address # FIXME: Umm. siteconfig = @site['_SiteConfig'] siteconfig.add(":siteml:info@example.org\n") eq 'info@example.org', @site.ml_address t_without_testmode { eq 'example.org/q', @site.title eq '1 - example.org/q', @site.get_page_title('1') } } end
test_url_test()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 87 def test_url_test site = @site page = site.create_new eq 'http://example.com', site.host_url eq 'http://example.com/test/', site.site_url eq 'http://example.com/test/1.html', site.page_url('1') eq 'test@q.example.com', site.ml_address t_without_testmode { eq 'example.com/test', site.title eq '1 - example.com/test', site.get_page_title('1') } siteconfig = site.create('_SiteConfig') siteconfig.store(":sitename:t\n") t_without_testmode { eq 't', site.title eq '1 - t', site.get_page_title('1') } end
test_url_top_site()
click to toggle source
# File vendor/qwik/lib/qwik/site-url.rb, line 126 def test_url_top_site site = @memory.farm.get_top_site page = site.create_new eq true, site.top_site? eq 'http://example.com', site.host_url eq 'http://example.com/', site.site_url eq 'http://example.com/1.html', site.page_url('1') eq 'www@q.example.com', site.ml_address t_without_testmode { eq 'example.com', site.title eq '1 - example.com', site.get_page_title('1') } end