Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
39c27683
Commit
39c27683
authored
Apr 01, 2020
by
Greg Messner
Browse files
Added test of DeployToken
parent
33d3f34b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
View file @
39c27683
...
...
@@ -49,6 +49,7 @@ import org.gitlab4j.api.models.CommitStatus;
import
org.gitlab4j.api.models.CompareResults
;
import
org.gitlab4j.api.models.Contributor
;
import
org.gitlab4j.api.models.DeployKey
;
import
org.gitlab4j.api.models.DeployToken
;
import
org.gitlab4j.api.models.Deployment
;
import
org.gitlab4j.api.models.Diff
;
import
org.gitlab4j.api.models.Discussion
;
...
...
@@ -200,6 +201,12 @@ public class TestGitLabApiBeans {
assertTrue
(
compareJson
(
deployment
,
"deployment.json"
));
}
@Test
public
void
testDeployTokens
()
throws
Exception
{
List
<
DeployToken
>
deployTokens
=
unmarshalResourceList
(
DeployToken
.
class
,
"deploy-tokens.json"
);
assertTrue
(
compareJson
(
deployTokens
,
"deploy-tokens.json"
));
}
@Test
public
void
testEmails
()
throws
Exception
{
List
<
Email
>
emails
=
unmarshalResourceList
(
Email
.
class
,
"emails.json"
);
...
...
src/test/resources/org/gitlab4j/api/deploy-tokens.json
0 → 100644
View file @
39c27683
[
{
"id"
:
1
,
"name"
:
"MyToken"
,
"username"
:
"gitlab+deploy-token-1"
,
"expires_at"
:
"2020-02-14T00:00:00.123Z"
,
"scopes"
:
[
"read_repository"
,
"read_registry"
]
}
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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