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
47881254
Commit
47881254
authored
May 12, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved json parsing out of service
[ci skip]
parent
3d553954
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
app.vue
app/assets/javascripts/issue_show/components/app.vue
+1
-0
index.js
app/assets/javascripts/issue_show/services/index.js
+2
-4
app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+6
-2
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
47881254
...
...
@@ -77,6 +77,7 @@ export default {
},
deleteIssuable
()
{
this
.
service
.
deleteIssuable
()
.
then
(
res
=>
res
.
json
())
.
then
((
data
)
=>
{
// Stop the poll so we don't get 404's with the issue not existing
this
.
poll
.
stop
();
...
...
app/assets/javascripts/issue_show/services/index.js
View file @
47881254
...
...
@@ -20,12 +20,10 @@ export default class Service {
}
deleteIssuable
()
{
return
this
.
resource
.
delete
()
.
then
(
res
=>
res
.
json
());
return
this
.
resource
.
delete
();
}
updateIssuable
(
data
)
{
return
this
.
resource
.
update
(
data
)
.
then
(
res
=>
res
.
json
());
return
this
.
resource
.
update
(
data
);
}
}
spec/javascripts/issue_show/components/app_spec.js
View file @
47881254
...
...
@@ -134,7 +134,9 @@ describe('Issuable output', () => {
spyOn
(
gl
.
utils
,
'visitUrl'
);
spyOn
(
vm
.
service
,
'deleteIssuable'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
resolve
({
path
:
'/test'
,
json
()
{
return
{
path
:
'/test'
};
},
});
}));
...
...
@@ -154,7 +156,9 @@ describe('Issuable output', () => {
spyOn
(
vm
.
poll
,
'stop'
);
spyOn
(
vm
.
service
,
'deleteIssuable'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
resolve
({
path
:
'/test'
,
json
()
{
return
{
path
:
'/test'
};
},
});
}));
...
...
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