BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d2256c18
Commit
d2256c18
authored
May 06, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub ajax in JS specs
parent
c9788bd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
issue_spec.js.coffee
spec/javascripts/issue_spec.js.coffee
+2
-1
merge_request_spec.js.coffee
spec/javascripts/merge_request_spec.js.coffee
+3
-1
No files found.
spec/javascripts/issue_spec.js.coffee
View file @
d2256c18
...
...
@@ -9,11 +9,12 @@ describe 'Issue', ->
@
issue
=
new
Issue
()
it
'modifies the Markdown field'
,
->
spyOn
(
jQuery
,
'ajax'
).
and
.
stub
()
$
(
'input[type=checkbox]'
).
attr
(
'checked'
,
true
).
trigger
(
'change'
)
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
)
it
'submits an ajax request on tasklist:changed'
,
->
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
req
)
->
spyOn
(
jQuery
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PATCH'
)
expect
(
req
.
url
).
toBe
(
'/foo'
)
expect
(
req
.
data
.
issue
.
description
).
not
.
toBe
(
null
)
...
...
spec/javascripts/merge_request_spec.js.coffee
View file @
d2256c18
...
...
@@ -11,11 +11,13 @@ describe 'MergeRequest', ->
@
merge
=
new
MergeRequest
({})
it
'modifies the Markdown field'
,
->
spyOn
(
jQuery
,
'ajax'
).
and
.
stub
()
$
(
'input[type=checkbox]'
).
attr
(
'checked'
,
true
).
trigger
(
'change'
)
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
)
it
'submits an ajax request on tasklist:changed'
,
->
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
req
)
->
spyOn
(
jQuery
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PATCH'
)
expect
(
req
.
url
).
toBe
(
'/foo'
)
expect
(
req
.
data
.
merge_request
.
description
).
not
.
toBe
(
null
)
...
...
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