forked from github/Toast-PhoneGap-Plugin
#4 test updates
This commit is contained in:
parent
be56435c26
commit
69f1fbaa80
@ -1,5 +1,5 @@
|
||||
exports.defineAutoTests = function() {
|
||||
|
||||
|
||||
var fail = function (done) {
|
||||
expect(true).toBe(false);
|
||||
done();
|
||||
@ -20,6 +20,14 @@ exports.defineAutoTests = function() {
|
||||
expect(window.plugins.toast.show).toBeDefined();
|
||||
});
|
||||
|
||||
it("should define showWithOptions", function() {
|
||||
expect(window.plugins.toast.showWithOptions).toBeDefined();
|
||||
});
|
||||
|
||||
it("should define optionsBuilder", function() {
|
||||
expect(window.plugins.toast.optionsBuilder).toBeDefined();
|
||||
});
|
||||
|
||||
it("should define showShortTop", function() {
|
||||
expect(window.plugins.toast.showShortTop).toBeDefined();
|
||||
});
|
||||
@ -47,11 +55,7 @@ exports.defineAutoTests = function() {
|
||||
|
||||
describe('Invalid usage', function () {
|
||||
it("should fail due to an invalid position", function(done) {
|
||||
window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done));
|
||||
});
|
||||
|
||||
it("should fail due to an invalid duration", function(done) {
|
||||
window.plugins.toast.show('hi', 'medium', 'top', fail.bind(null, done), succeed.bind(null, done));
|
||||
window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user