Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
52
gaia/apps/camera/test/unit/views/overlay_test.js
Executable file
52
gaia/apps/camera/test/unit/views/overlay_test.js
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
/*jshint maxlen:false*/
|
||||
'use strict';
|
||||
|
||||
suite('views/overlay', function() {
|
||||
suiteSetup(function(done) {
|
||||
var self = this;
|
||||
requirejs([
|
||||
'views/overlay'
|
||||
], function(OverlayView) {
|
||||
self.OverlayView = OverlayView;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
setup(function() {
|
||||
this.view = new this.OverlayView({
|
||||
type: 'unavailable',
|
||||
closable: false
|
||||
});
|
||||
});
|
||||
|
||||
suite('OverlayView#getOverlayData()', function() {
|
||||
test('Should return correct data for \'unavailable\'', function() {
|
||||
var output = this.view.getData('unavailable');
|
||||
assert.equal(output.title, 'nocard2-title');
|
||||
assert.equal(output.body, 'nocard3-text');
|
||||
});
|
||||
|
||||
test('Should return correct data for \'nospace\'', function() {
|
||||
var output = this.view.getData('nospace');
|
||||
assert.equal(output.title, 'nospace2-title');
|
||||
assert.equal(output.body, 'nospace2-text');
|
||||
});
|
||||
|
||||
test('Should return correct data for \'shared\'', function() {
|
||||
var output = this.view.getData('shared');
|
||||
assert.equal(output.title, 'pluggedin2-title');
|
||||
assert.equal(output.body, 'pluggedin2-text');
|
||||
});
|
||||
|
||||
test('Should return correct data for \'request-fail\'', function() {
|
||||
var output = this.view.getData('request-fail');
|
||||
assert.equal(output.title, 'camera-unavailable-title');
|
||||
assert.equal(output.body, 'camera-unavailable-text');
|
||||
});
|
||||
|
||||
test('Should return false for unknown key', function() {
|
||||
var output = this.view.getData('something-not-known');
|
||||
assert.equal(output, false);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue