From 9f25af79bd3f998f2f506b03a9e414f642c9d4d5 Mon Sep 17 00:00:00 2001 From: Jack OConnor Date: Sat, 6 Sep 2014 18:49:39 -0700 Subject: [PATCH] fix tests --- src/spec/tests/methods/isValidNumber.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/spec/tests/methods/isValidNumber.js b/src/spec/tests/methods/isValidNumber.js index 2bfd4c6e4..0d6bdde26 100644 --- a/src/spec/tests/methods/isValidNumber.js +++ b/src/spec/tests/methods/isValidNumber.js @@ -57,22 +57,13 @@ describe("isValidNumber:", function() { input.intlTelInput("setNumber", "07733 123456"); }); - it("returns false for: incorrect selected country, no allowNational flag", function() { + it("returns false for: incorrect selected country", function() { expect(input.intlTelInput("isValidNumber")).toBeFalsy(); }); - it("returns false for: incorrect selected country, allowNational flag", function() { - expect(input.intlTelInput("isValidNumber", true)).toBeFalsy(); - }); - - it("returns false for: correct selected country, no allowNational flag", function() { + it("returns true for: correct selected country", function() { input.intlTelInput("selectCountry", "gb"); - expect(input.intlTelInput("isValidNumber")).toBeFalsy(); - }); - - it("returns true for: correct selected country, allowNational flag", function() { - input.intlTelInput("selectCountry", "gb"); - expect(input.intlTelInput("isValidNumber", true)).toBeTruthy(); + expect(input.intlTelInput("isValidNumber")).toBeTruthy(); }); }); @@ -81,7 +72,7 @@ describe("isValidNumber:", function() { it("returns false for: invalid national number, correct selected country, allowNational flag", function() { input.intlTelInput("setNumber", "07733 123"); input.intlTelInput("selectCountry", "gb"); - expect(input.intlTelInput("isValidNumber", true)).toBeFalsy(); + expect(input.intlTelInput("isValidNumber")).toBeFalsy(); }); });