diff --git a/Tests/backbone-tests.ts b/Tests/backbone-tests.ts index e3c8cd42b..f66f6de44 100644 --- a/Tests/backbone-tests.ts +++ b/Tests/backbone-tests.ts @@ -67,4 +67,23 @@ note.get("title") note.set({title: "March 20", content: "In his eyes she eclipses..."}); -note.set("title", "A Scandal in Bohemia"); \ No newline at end of file +note.set("title", "A Scandal in Bohemia"); + +////////// + +class Employee extends Backbone.Model { + reports: EmployeeCollection; + + constructor (options? ) { + super(options); + this.reports = new EmployeeCollection(); + this.reports.url = '../api/employees/' + this.id + '/reports'; + } +} + +class EmployeeCollection extends Backbone.Collection { + + url: string = "../api/employees"; + model = Employee; + findByName(key) {} +} \ No newline at end of file