Add application tests

This commit is contained in:
Nicolas Le Goff
2013-05-23 17:16:43 +02:00
committed by Romain Neutron
parent ac6c9970e2
commit f886874f8d
13 changed files with 699 additions and 24 deletions

View File

@@ -4,7 +4,8 @@ define([
], function(_, Backbone) {
var FieldModel = Backbone.Model.extend({
initialize : function(attributes, options) {
if (attributes && ! "sbas-id" in attributes) {
attributes = attributes || {};
if (typeof attributes === "object" && false === "sbas-id" in attributes) {
throw "You must set a sbas id";
}
},