Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f68a3f3f
Commit
f68a3f3f
authored
May 16, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix implicit window object reference within gl_form_spec
parent
fc4cabca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
spec/javascripts/gl_form_spec.js
spec/javascripts/gl_form_spec.js
+6
-6
No files found.
spec/javascripts/gl_form_spec.js
View file @
f68a3f3f
...
...
@@ -27,7 +27,7 @@ describe('GLForm', () => {
$
.
prototype
.
off
.
calls
.
reset
();
$
.
prototype
.
on
.
calls
.
reset
();
$
.
prototype
.
css
.
calls
.
reset
();
autosize
.
calls
.
reset
();
window
.
autosize
.
calls
.
reset
();
done
();
});
});
...
...
@@ -51,7 +51,7 @@ describe('GLForm', () => {
});
it
(
'
should autosize the textarea
'
,
()
=>
{
expect
(
autosize
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
));
expect
(
window
.
autosize
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
));
});
it
(
'
should set the resize css property to vertical
'
,
()
=>
{
...
...
@@ -81,7 +81,7 @@ describe('GLForm', () => {
spyOn
(
$
.
prototype
,
'
data
'
);
spyOn
(
$
.
prototype
,
'
outerHeight
'
).
and
.
returnValue
(
200
);
spyOn
(
window
,
'
outerHeight
'
).
and
.
returnValue
(
400
);
spyOn
(
autosize
,
'
destroy
'
);
spyOn
(
window
.
autosize
,
'
destroy
'
);
this
.
glForm
.
destroyAutosize
();
});
...
...
@@ -95,7 +95,7 @@ describe('GLForm', () => {
});
it
(
'
should call autosize destroy
'
,
()
=>
{
expect
(
autosize
.
destroy
).
toHaveBeenCalledWith
(
this
.
textarea
);
expect
(
window
.
autosize
.
destroy
).
toHaveBeenCalledWith
(
this
.
textarea
);
});
it
(
'
should set the data-height attribute
'
,
()
=>
{
...
...
@@ -114,9 +114,9 @@ describe('GLForm', () => {
it
(
'
should return undefined if the data-height equals the outerHeight
'
,
()
=>
{
spyOn
(
$
.
prototype
,
'
outerHeight
'
).
and
.
returnValue
(
200
);
spyOn
(
$
.
prototype
,
'
data
'
).
and
.
returnValue
(
200
);
spyOn
(
autosize
,
'
destroy
'
);
spyOn
(
window
.
autosize
,
'
destroy
'
);
expect
(
this
.
glForm
.
destroyAutosize
()).
toBeUndefined
();
expect
(
autosize
.
destroy
).
not
.
toHaveBeenCalled
();
expect
(
window
.
autosize
.
destroy
).
not
.
toHaveBeenCalled
();
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment