Commit e440580c by David Baumgold

Started writing Backbone tests

Hacking the Python, because our JS dependency management is borked.
parent 69a6ec0c
......@@ -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
},
......
describe "CMS.Models.SystemFeedback", ->
m = new CMS.Models.SystemFeedback()
it "should have an empty message by default", ->
expect(m.get("message")).toEqual("")
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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment