Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
9bb7e665
Commit
9bb7e665
authored
Apr 03, 2019
by
Hannah Stepanek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace sandbox.stub() with sinon.stub()
parent
487578c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
groups-test.js
src/sidebar/services/test/groups-test.js
+8
-13
No files found.
src/sidebar/services/test/groups-test.js
View file @
9bb7e665
...
@@ -50,7 +50,6 @@ describe('groups', function() {
...
@@ -50,7 +50,6 @@ describe('groups', function() {
let
fakeLocalStorage
;
let
fakeLocalStorage
;
let
fakeRootScope
;
let
fakeRootScope
;
let
fakeServiceUrl
;
let
fakeServiceUrl
;
let
sandbox
;
beforeEach
(
function
()
{
beforeEach
(
function
()
{
fakeAuth
=
{
fakeAuth
=
{
...
@@ -59,7 +58,6 @@ describe('groups', function() {
...
@@ -59,7 +58,6 @@ describe('groups', function() {
fakeFeatures
=
{
fakeFeatures
=
{
flagEnabled
:
sinon
.
stub
().
returns
(
false
),
flagEnabled
:
sinon
.
stub
().
returns
(
false
),
};
};
sandbox
=
sinon
.
sandbox
.
create
();
fakeStore
=
fakeReduxStore
(
fakeStore
=
fakeReduxStore
(
{
{
...
@@ -92,8 +90,8 @@ describe('groups', function() {
...
@@ -92,8 +90,8 @@ describe('groups', function() {
fakeSession
=
sessionWithThreeGroups
();
fakeSession
=
sessionWithThreeGroups
();
fakeIsSidebar
=
true
;
fakeIsSidebar
=
true
;
fakeLocalStorage
=
{
fakeLocalStorage
=
{
getItem
:
s
andbox
.
stub
(),
getItem
:
s
inon
.
stub
(),
setItem
:
s
andbox
.
stub
(),
setItem
:
s
inon
.
stub
(),
};
};
fakeRootScope
=
{
fakeRootScope
=
{
eventCallbacks
:
{},
eventCallbacks
:
{},
...
@@ -108,7 +106,7 @@ describe('groups', function() {
...
@@ -108,7 +106,7 @@ describe('groups', function() {
}
}
},
},
$broadcast
:
s
andbox
.
stub
(),
$broadcast
:
s
inon
.
stub
(),
};
};
fakeApi
=
{
fakeApi
=
{
annotation
:
{
annotation
:
{
...
@@ -117,26 +115,23 @@ describe('groups', function() {
...
@@ -117,26 +115,23 @@ describe('groups', function() {
group
:
{
group
:
{
member
:
{
member
:
{
delete
:
s
andbox
.
stub
().
returns
(
Promise
.
resolve
()),
delete
:
s
inon
.
stub
().
returns
(
Promise
.
resolve
()),
},
},
read
:
sinon
.
stub
().
returns
(
Promise
.
resolve
()),
},
},
groups
:
{
groups
:
{
list
:
s
andbox
.
stub
().
returns
(
dummyGroups
),
list
:
s
inon
.
stub
().
returns
(
dummyGroups
),
},
},
profile
:
{
profile
:
{
groups
:
{
groups
:
{
read
:
s
andbox
.
stub
().
returns
(
Promise
.
resolve
([
dummyGroups
[
0
]])),
read
:
s
inon
.
stub
().
returns
(
Promise
.
resolve
([
dummyGroups
[
0
]])),
},
},
},
},
};
};
fakeServiceUrl
=
s
andbox
.
stub
();
fakeServiceUrl
=
s
inon
.
stub
();
fakeSettings
=
{};
fakeSettings
=
{};
});
});
afterEach
(
function
()
{
sandbox
.
restore
();
});
function
service
()
{
function
service
()
{
return
groups
(
return
groups
(
fakeRootScope
,
fakeRootScope
,
...
...
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