@@ -12,7 +12,6 @@ define([
12
12
var obj ;
13
13
14
14
beforeEach ( function ( ) {
15
-
16
15
/**
17
16
* Dummy constructor to use for instantiation
18
17
* @constructor
@@ -27,14 +26,14 @@ define([
27
26
describe ( '"openDialog" method' , function ( ) {
28
27
it ( 'Opens dialog with provided targetElementId' , function ( ) {
29
28
var options = {
30
- 'targetElementId' : 1
31
- } ;
29
+ 'targetElementId' : 1
30
+ } ;
32
31
33
32
spyOn ( $ , 'ajax' ) . and . callFake (
34
- function ( ) {
33
+ function ( ) {
35
34
return {
36
35
/**
37
- * Succes result of ajax request
36
+ * Success result of ajax request
38
37
*/
39
38
done : function ( ) {
40
39
obj . targetElementId = 1 ;
@@ -44,22 +43,21 @@ define([
44
43
obj . openDialog ( 'instance/url' , 100 , 100 , 'title' , options ) ;
45
44
obj . openDialog ( 'instance/url' , 100 , 100 , 'title' , options ) ;
46
45
expect ( $ . ajax . calls . count ( ) ) . toBe ( 1 ) ;
47
-
48
46
} ) ;
49
47
50
48
it ( 'Opens dialog with provided url param' , function ( ) {
51
49
spyOn ( $ , 'ajax' ) . and . callFake (
52
- function ( ) {
53
- return {
54
- /**
55
- * Succes result of ajax request
56
- */
57
- done : function ( ) {
58
- obj . targetElementId = 'instance/url' ;
59
- obj . modalLoaded = true ;
60
- }
61
- } ;
62
- } ) ;
50
+ function ( ) {
51
+ return {
52
+ /**
53
+ * Success result of ajax request
54
+ */
55
+ done : function ( ) {
56
+ obj . targetElementId = 'instance/url' ;
57
+ obj . modalLoaded = true ;
58
+ }
59
+ } ;
60
+ } ) ;
63
61
obj . openDialog ( 'instance/url' , 100 , 100 , 'title' , undefined ) ;
64
62
obj . openDialog ( 'instance/url' , 100 , 100 , 'title' , undefined ) ;
65
63
expect ( $ . ajax . calls . count ( ) ) . toBe ( 1 ) ;
0 commit comments