Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
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
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
Java-于龙
origin-web-common
Commits
6131019b
Unverified
Commit
6131019b
authored
Feb 07, 2018
by
Sam Padgett
Committed by
GitHub
Feb 07, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #279 from benjaminapetersen/unit-test/apiService/toAPIVersion
Add tests to APIService.toAPIVersion
parents
fcf54743
8f3316a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
apiServiceSpec.js
test/spec/services/apiServiceSpec.js
+15
-0
No files found.
test/spec/services/apiServiceSpec.js
View file @
6131019b
...
@@ -7,6 +7,21 @@ describe("APIService", function() {
...
@@ -7,6 +7,21 @@ describe("APIService", function() {
});
});
});
});
describe
(
'#toAPIVersion'
,
()
=>
{
var
tc
=
[
[
'build.openshift.io/v1'
,
{
group
:
'build.openshift.io'
,
version
:
'v1'
,
resource
:
'builds'
}],
[
'build.openshift.io/v1'
,
{
group
:
'build.openshift.io'
,
version
:
'v1'
,
resource
:
'buildconfigs'
}],
[
'v1'
,
{
version
:
'v1'
,
resource
:
'configmaps'
}],
[
undefined
,
{
resource
:
'kangaroos'
}],
];
_
.
each
(
tc
,
_
.
spread
((
output
,
input
)
=>
{
it
(
'should convert '
+
JSON
.
stringify
(
input
)
+
' into '
+
output
,
()
=>
{
expect
(
APIService
.
toAPIVersion
(
input
)
).
toEqual
(
output
);
});
}));
});
describe
(
"#toResourceGroupVersion"
,
function
()
{
describe
(
"#toResourceGroupVersion"
,
function
()
{
var
tc
=
[
var
tc
=
[
...
...
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