Neues Initialrelease mit IonicMaterial
This commit is contained in:
28
www/lib/ngCordova/test/mocks/brightness.spec.js
Normal file
28
www/lib/ngCordova/test/mocks/brightness.spec.js
Normal file
@@ -0,0 +1,28 @@
|
||||
describe('ngCordovaMocks', function() {
|
||||
beforeEach(function() {
|
||||
module('ngCordovaMocks');
|
||||
});
|
||||
|
||||
describe('cordovaBrightness', function () {
|
||||
var $cordovaBrightness = null;
|
||||
|
||||
beforeEach(inject(function (_$cordovaBrightness_) {
|
||||
$cordovaBrightness = _$cordovaBrightness_;
|
||||
}));
|
||||
|
||||
it('should get the current brightness', function () {
|
||||
$cordovaBrightness.get().then(function (result) {
|
||||
expect(result.value).toEqual(100);
|
||||
});
|
||||
});
|
||||
|
||||
it('should set the current brightness', function () {
|
||||
$cordovaBrightness.set(50);
|
||||
|
||||
var currentBrightness = $cordovaBrightness.get();
|
||||
$cordovaBrightness.get().then(function (result) {
|
||||
expect(result.value).toEqual(50);
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user