|
Ultima modificación |
Ver Log
|
| Rev |
Autor |
Línea Nro. |
Línea |
| 1 |
www |
1 |
"use strict";
|
|
|
2 |
|
|
|
3 |
describe("defaults: change default plugin options", function() {
|
|
|
4 |
|
|
|
5 |
beforeEach(function() {
|
|
|
6 |
intlSetup();
|
|
|
7 |
input = $("<input>").wrap("div");
|
|
|
8 |
});
|
|
|
9 |
|
|
|
10 |
afterEach(function() {
|
|
|
11 |
intlTeardown();
|
|
|
12 |
});
|
|
|
13 |
|
|
|
14 |
describe('setting the default option initialCountry=ru and initialising the plugin', function() {
|
|
|
15 |
beforeEach(function() {
|
|
|
16 |
window.intlTelInputGlobals.defaults.initialCountry = "ru";
|
|
|
17 |
iti = window.intlTelInput(input[0]);
|
|
|
18 |
});
|
|
|
19 |
|
|
|
20 |
afterEach(function() {
|
|
|
21 |
window.intlTelInputGlobals.defaults.initialCountry = "";
|
|
|
22 |
});
|
|
|
23 |
|
|
|
24 |
it("displays the russian flag", function() {
|
|
|
25 |
expect(iti.getSelectedCountryData().iso2).toEqual("ru");
|
|
|
26 |
});
|
|
|
27 |
});
|
|
|
28 |
});
|