Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jackocnr committed Sep 7, 2014
1 parent 69ea54f commit 9f25af7
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/spec/tests/methods/isValidNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

});
Expand All @@ -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();
});

});
Expand Down

0 comments on commit 9f25af7

Please sign in to comment.