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
8f9681bd
Commit
8f9681bd
authored
Nov 08, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ineffective Vue service specs
parent
2f644452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
113 deletions
+0
-113
spec/javascripts/sidebar/sidebar_service_spec.js
spec/javascripts/sidebar/sidebar_service_spec.js
+0
-66
spec/javascripts/vue_mr_widget/services/mr_widget_service_spec.js
...ascripts/vue_mr_widget/services/mr_widget_service_spec.js
+0
-47
No files found.
spec/javascripts/sidebar/sidebar_service_spec.js
deleted
100644 → 0
View file @
2f644452
import
Vue
from
'
vue
'
;
import
SidebarService
from
'
~/sidebar/services/sidebar_service
'
;
import
Mock
from
'
./mock_data
'
;
describe
(
'
Sidebar service
'
,
()
=>
{
beforeEach
(()
=>
{
Vue
.
http
.
interceptors
.
push
(
Mock
.
sidebarMockInterceptor
);
this
.
service
=
new
SidebarService
({
endpoint
:
'
/gitlab-org/gitlab-shell/issues/5.json
'
,
toggleSubscriptionEndpoint
:
'
/gitlab-org/gitlab-shell/issues/5/toggle_subscription
'
,
moveIssueEndpoint
:
'
/gitlab-org/gitlab-shell/issues/5/move
'
,
projectsAutocompleteEndpoint
:
'
/autocomplete/projects?project_id=15
'
,
});
});
afterEach
(()
=>
{
SidebarService
.
singleton
=
null
;
Vue
.
http
.
interceptors
=
_
.
without
(
Vue
.
http
.
interceptors
,
Mock
.
sidebarMockInterceptor
);
});
it
(
'
gets the data
'
,
(
done
)
=>
{
this
.
service
.
get
()
.
then
((
resp
)
=>
{
expect
(
resp
).
toBeDefined
();
done
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
updates the data
'
,
(
done
)
=>
{
this
.
service
.
update
(
'
issue[assignee_ids]
'
,
[
1
])
.
then
((
resp
)
=>
{
expect
(
resp
).
toBeDefined
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
gets projects for autocomplete
'
,
(
done
)
=>
{
this
.
service
.
getProjectsAutocomplete
()
.
then
((
resp
)
=>
{
expect
(
resp
).
toBeDefined
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
moves the issue to another project
'
,
(
done
)
=>
{
this
.
service
.
moveIssue
(
123
)
.
then
((
resp
)
=>
{
expect
(
resp
).
toBeDefined
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
toggles the subscription
'
,
(
done
)
=>
{
this
.
service
.
toggleSubscription
()
.
then
((
resp
)
=>
{
expect
(
resp
).
toBeDefined
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
spec/javascripts/vue_mr_widget/services/mr_widget_service_spec.js
deleted
100644 → 0
View file @
2f644452
import
Vue
from
'
vue
'
;
import
VueResource
from
'
vue-resource
'
;
import
MRWidgetService
from
'
~/vue_merge_request_widget/services/mr_widget_service
'
;
Vue
.
use
(
VueResource
);
describe
(
'
MRWidgetService
'
,
()
=>
{
const
mr
=
{
mergePath
:
'
./
'
,
mergeCheckPath
:
'
./
'
,
cancelAutoMergePath
:
'
./
'
,
removeWIPPath
:
'
./
'
,
sourceBranchPath
:
'
./
'
,
ciEnvironmentsStatusPath
:
'
./
'
,
statusPath
:
'
./
'
,
mergeActionsContentPath
:
'
./
'
,
isServiceStore
:
true
,
};
it
(
'
should have store and resources created in constructor
'
,
()
=>
{
const
service
=
new
MRWidgetService
(
mr
);
expect
(
service
.
mergeResource
).
toBeDefined
();
expect
(
service
.
mergeCheckResource
).
toBeDefined
();
expect
(
service
.
cancelAutoMergeResource
).
toBeDefined
();
expect
(
service
.
removeWIPResource
).
toBeDefined
();
expect
(
service
.
removeSourceBranchResource
).
toBeDefined
();
expect
(
service
.
deploymentsResource
).
toBeDefined
();
expect
(
service
.
pollResource
).
toBeDefined
();
expect
(
service
.
mergeActionsContentResource
).
toBeDefined
();
});
it
(
'
should have methods defined
'
,
()
=>
{
window
.
history
.
pushState
({},
null
,
'
/
'
);
const
service
=
new
MRWidgetService
(
mr
);
expect
(
service
.
merge
()).
toBeDefined
();
expect
(
service
.
cancelAutomaticMerge
()).
toBeDefined
();
expect
(
service
.
removeWIP
()).
toBeDefined
();
expect
(
service
.
removeSourceBranch
()).
toBeDefined
();
expect
(
service
.
fetchDeployments
()).
toBeDefined
();
expect
(
service
.
poll
()).
toBeDefined
();
expect
(
service
.
checkStatus
()).
toBeDefined
();
expect
(
service
.
fetchMergeActionsContent
()).
toBeDefined
();
expect
(
MRWidgetService
.
stopEnvironment
()).
toBeDefined
();
});
});
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