@@ -112,6 +112,14 @@ describe('Config', function () {
112112 config . paths . should . have . property ( 'subdir' , '/my/blog' ) ;
113113 } ) ;
114114
115+ it ( 'should add subdir to list of protected slugs' , function ( ) {
116+ configUtils . set ( { url : 'http://my-ghost-blog.com/blog' } ) ;
117+ config . slugs . protected . should . containEql ( 'blog' ) ;
118+
119+ configUtils . set ( { url : 'http://my-ghost-blog.com/my/blog' } ) ;
120+ config . slugs . protected . should . containEql ( 'blog' ) ;
121+ } ) ;
122+
115123 it ( 'should allow specific properties to be user defined' , function ( ) {
116124 var contentPath = path . join ( config . paths . appRoot , 'otherContent' , '/' ) ,
117125 configFile = 'configFileDanceParty.js' ;
@@ -268,6 +276,10 @@ describe('Config', function () {
268276 configUtils . set ( { url : 'http://my-ghost-blog.com/blog' } ) ;
269277 config . urlFor ( testContext , testData ) . should . equal ( '/blog/short-and-sweet/' ) ;
270278 config . urlFor ( testContext , testData , true ) . should . equal ( 'http://my-ghost-blog.com/blog/short-and-sweet/' ) ;
279+
280+ testData . post . url = '/blog-one/' ;
281+ config . urlFor ( testContext , testData ) . should . equal ( '/blog/blog-one/' ) ;
282+ config . urlFor ( testContext , testData , true ) . should . equal ( 'http://my-ghost-blog.com/blog/blog-one/' ) ;
271283 } ) ;
272284
273285 it ( 'should return url for a tag when asked for' , function ( ) {
0 commit comments