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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b24b0679
Commit
b24b0679
authored
Aug 13, 2019
by
Vitaly Slobodin
Committed by
Douglas Barbosa Alexandre
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments for tests
parent
0b680a5f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
79 deletions
+0
-79
ee/spec/frontend/billings/store/modules/subscription/mock_subscription.json
...illings/store/modules/subscription/mock_subscription.json
+0
-0
ee/spec/frontend/billings/store/modules/subscription/mock_tables.json
...tend/billings/store/modules/subscription/mock_tables.json
+0
-0
ee/spec/frontend/billings/stores/modules/subscription/mutations_spec.js
...nd/billings/stores/modules/subscription/mutations_spec.js
+0
-76
locale/gitlab.pot
locale/gitlab.pot
+0
-3
No files found.
ee/spec/frontend/billings/store
s
/modules/subscription/mock_subscription.json
→
ee/spec/frontend/billings/store/modules/subscription/mock_subscription.json
View file @
b24b0679
File moved
ee/spec/frontend/billings/store
s
/modules/subscription/mock_tables.json
→
ee/spec/frontend/billings/store/modules/subscription/mock_tables.json
View file @
b24b0679
File moved
ee/spec/frontend/billings/stores/modules/subscription/mutations_spec.js
deleted
100644 → 0
View file @
0b680a5f
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
createState
from
'
ee/billings/stores/modules/subscription/state
'
;
import
*
as
types
from
'
ee/billings/stores/modules/subscription/mutation_types
'
;
import
mutations
from
'
ee/billings/stores/modules/subscription/mutations
'
;
import
subscription
from
'
./mock_subscription.json
'
;
import
tables
from
'
./mock_tables.json
'
;
describe
(
'
EE billings subscription module mutations
'
,
()
=>
{
let
state
;
beforeEach
(()
=>
{
state
=
createState
();
});
describe
(
types
.
SET_NAMESPACE_ID
,
()
=>
{
it
(
'
sets namespaceId
'
,
()
=>
{
const
expectedNamespaceId
=
'
test
'
;
expect
(
state
.
namespaceId
).
toBeNull
();
mutations
[
types
.
SET_NAMESPACE_ID
](
state
,
expectedNamespaceId
);
expect
(
state
.
namespaceId
).
toBe
(
expectedNamespaceId
);
});
});
describe
(
types
.
REQUEST_SUBSCRIPTION
,
()
=>
{
it
(
'
sets isLoading to true
'
,
()
=>
{
mutations
[
types
.
REQUEST_SUBSCRIPTION
](
state
);
expect
(
state
.
isLoading
).
toBeTruthy
();
});
it
(
'
sets hasError to false
'
,
()
=>
{
mutations
[
types
.
REQUEST_SUBSCRIPTION
](
state
);
expect
(
state
.
hasError
).
toBeFalsy
();
});
});
describe
(
types
.
RECEIVE_SUBSCRIPTION_SUCCESS
,
()
=>
{
beforeEach
(()
=>
{
mutations
[
types
.
RECEIVE_SUBSCRIPTION_SUCCESS
](
state
,
subscription
);
});
it
(
'
sets isLoading to false
'
,
()
=>
{
expect
(
state
.
isLoading
).
toBeFalsy
();
});
it
(
'
sets plan
'
,
()
=>
{
const
{
plan
}
=
convertObjectPropsToCamelCase
(
subscription
,
{
deep
:
true
});
expect
(
state
.
plan
).
toEqual
(
plan
);
});
it
(
'
sets tables
'
,
()
=>
{
const
expectedTables
=
convertObjectPropsToCamelCase
(
tables
,
{
deep
:
true
});
expect
(
state
.
tables
).
toEqual
(
expectedTables
);
});
});
describe
(
types
.
RECEIVE_SUBSCRIPTION_ERROR
,
()
=>
{
beforeEach
(()
=>
{
mutations
[
types
.
RECEIVE_SUBSCRIPTION_ERROR
](
state
);
});
it
(
'
sets isLoading to false
'
,
()
=>
{
expect
(
state
.
isLoading
).
toBeFalsy
();
});
it
(
'
sets hasError to true
'
,
()
=>
{
expect
(
state
.
hasError
).
toBeTruthy
();
});
});
});
locale/gitlab.pot
View file @
b24b0679
...
...
@@ -302,9 +302,6 @@ msgstr ""
msgid "%{percent}%% complete"
msgstr ""
msgid "%{prefix}: %{planName} %{suffix}"
msgstr ""
msgid "%{service_title} activated."
msgstr ""
...
...
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