Started writing Backbone tests
Hacking the Python, because our JS dependency management is borked.
This commit is contained in:
@@ -221,7 +221,8 @@ PIPELINE_JS = {
|
||||
'source_filenames': sorted(
|
||||
rooted_glob(COMMON_ROOT / 'static/', 'coffee/src/**/*.js') +
|
||||
rooted_glob(PROJECT_ROOT / 'static/', 'coffee/src/**/*.js')
|
||||
) + ['js/hesitate.js', 'js/base.js'],
|
||||
) + ['js/hesitate.js', 'js/base.js',
|
||||
'js/models/feedback.js', 'js/views/feedback.js'],
|
||||
'output_filename': 'js/cms-application.js',
|
||||
'test_order': 0
|
||||
},
|
||||
|
||||
5
cms/static/coffee/spec/models/feedback_spec.coffee
Normal file
5
cms/static/coffee/spec/models/feedback_spec.coffee
Normal file
@@ -0,0 +1,5 @@
|
||||
describe "CMS.Models.SystemFeedback", ->
|
||||
m = new CMS.Models.SystemFeedback()
|
||||
|
||||
it "should have an empty message by default", ->
|
||||
expect(m.get("message")).toEqual("")
|
||||
@@ -1,8 +1,8 @@
|
||||
CMS.Models.SystemFeedback = Backbone.Model.extend({
|
||||
defaults: {
|
||||
"type": null, // "warning", "confirmation", "error", "announcement", "step-required", etc
|
||||
"title": null,
|
||||
"message": null,
|
||||
"title": "",
|
||||
"message": "",
|
||||
"shown": true,
|
||||
"close": false, // show a close button?
|
||||
"icon": true, // show an icon?
|
||||
|
||||
Reference in New Issue
Block a user