admin-config
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -48,3 +48,3 @@ import Menu from './Menu/Menu'; | ||
url = baseApiUrl + entity.name(); | ||
if (identifierValue) { | ||
if (identifierValue != null) { | ||
url += '/' + identifierValue; | ||
@@ -51,0 +51,0 @@ } |
{ | ||
"name": "admin-config", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -19,2 +19,9 @@ var assert = require('chai').assert; | ||
it('should work for zero indentifier', function() { | ||
var application = new Application(); | ||
var entity = new Entity('posts'); | ||
application.addEntity(entity); | ||
assert.equal('posts/0', application.getRouteFor(entity, null, null, 0, null)); | ||
}); | ||
it('should use the application baseApiUrl when provided', function() { | ||
@@ -235,3 +242,3 @@ var application = new Application(); | ||
let dashboard = new Dashboard(); | ||
const collection = { IAmAFakeCollection: true, name: () => 'foo' }; | ||
const collection = { IAmAFakeCollection: true, name: () => 'foo' }; | ||
dashboard.addCollection(collection) | ||
@@ -275,3 +282,3 @@ let application = new Application(); | ||
new Field('field3'), | ||
new Field('field4') | ||
new Field('field4') | ||
]; | ||
@@ -278,0 +285,0 @@ |
170695
4379