Sha256: d794d3125473601b2e25a92ad413f1bd7264e1627b380dcc4d51069b652bff6f
Contents?: true
Size: 955 Bytes
Versions: 8
Compression:
Stored size: 955 Bytes
Contents
var FontApiUrlBuilderTest = TestCase('FontApiUrlBuilderTest'); FontApiUrlBuilderTest.prototype.testThrowsExceptionIfNoFontFamilies = function() { var fontApiUrlBuilder = new webfont.FontApiUrlBuilder("http://moo"); try { fontApiUrlBuilder.build(); fail('build should have thrown an exception.'); } catch (e) { // success } }; FontApiUrlBuilderTest.prototype.testBuildProperUrl = function() { var fontApiUrlBuilder = new webfont.FontApiUrlBuilder("http://moo"); fontApiUrlBuilder.setFontFamilies([ 'Font1', 'Font2' ]); assertEquals('http://moo?family=Font1%7CFont2', fontApiUrlBuilder.build()); }; FontApiUrlBuilderTest.prototype.testBuildProperDefaultUrl = function() { var fontApiUrlBuilder = new webfont.FontApiUrlBuilder(); fontApiUrlBuilder.setFontFamilies([ 'Font1', 'Font2' ]); assertEquals("http:" + webfont.FontApiUrlBuilder.DEFAULT_API_URL + '?family=Font1%7CFont2', fontApiUrlBuilder.build()); };
Version data entries
8 entries across 8 versions & 1 rubygems