Merge pull request #538 from edx/db/course-team-admin-grants

Add error messaging to course team page
This commit is contained in:
David Baumgold
2013-08-01 11:58:52 -07:00
9 changed files with 237 additions and 71 deletions

View File

@@ -0,0 +1,9 @@
describe "CMS.Models.Course", ->
describe "basic", ->
beforeEach ->
@model = new CMS.Models.Course({
name: "Greek Hero"
})
it "should take a name argument", ->
expect(@model.get("name")).toEqual("Greek Hero")

View File

@@ -0,0 +1,10 @@
CMS.Models.Course = Backbone.Model.extend({
defaults: {
"name": ""
},
validate: function(attrs, options) {
if (!attrs.name) {
return gettext("You must specify a name");
}
}
});